Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0175759

Browse files
author
Thomas G. Lockhart
committed
Fix up elog messages for consistant usage of quotes around arguments.
1 parent80440a5 commit0175759

File tree

1 file changed

+16
-22
lines changed

1 file changed

+16
-22
lines changed

‎src/backend/parser/analyze.c

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.47 1997/10/25 01:09:35 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.48 1997/10/30 16:34:22 thomas Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -900,7 +900,7 @@ transformIdent(ParseState *pstate, Node *expr, int precedence)
900900
}
901901

902902
if (result==NULL)
903-
elog(WARN,"attribute\"%s\" not found",ident->name);
903+
elog(WARN,"attribute'%s' not found",ident->name);
904904

905905
returnresult;
906906
}
@@ -1028,8 +1028,8 @@ exprType(Node *expr)
10281028

10291029
/*
10301030
* expandAllTables -
1031-
* turns '*' (in the target list) into a list of attributes (of all
1032-
* relations in the range table)
1031+
* turns '*' (in the target list) into a list of attributes
1032+
* (of allrelations in the range table)
10331033
*/
10341034
staticList*
10351035
expandAllTables(ParseState*pstate)
@@ -1173,7 +1173,7 @@ makeTargetNames(ParseState *pstate, List *cols)
11731173
varattno(pstate->p_target_relation,name);
11741174
foreach(nxt,lnext(tl))
11751175
if (!strcmp(name, ((Ident*)lfirst(nxt))->name))
1176-
elog (WARN,"Attribute%s should be specified only once",name);
1176+
elog (WARN,"Attribute'%s' should be specified only once",name);
11771177
}
11781178
}
11791179

@@ -1209,15 +1209,9 @@ transformTargetList(ParseState *pstate, List *targetlist)
12091209
handleTargetColname(pstate,&res->name,NULL,identname);
12101210

12111211
/*
1212-
* here we want to look for column names only, not
1213-
*relation
1212+
* here we want to look for column names only, not relation
1213+
*names (even though they can be stored in Ident nodes, too)
12141214
*/
1215-
1216-
/*
1217-
* names (even though they can be stored in Ident
1218-
* nodes,
1219-
*/
1220-
/* too)*/
12211215
expr=transformIdent(pstate, (Node*)res->val,EXPR_COLUMN_FIRST);
12221216
type_id=exprType(expr);
12231217
type_len=tlen(get_id_type(type_id));
@@ -1755,15 +1749,15 @@ find_targetlist_entry(ParseState *pstate, SortGroupBy *sortgroupby, List *tlist)
17551749
if (real_rtable_pos==test_rtable_pos)
17561750
{
17571751
if (target_result!=NULL)
1758-
elog(WARN,"Order/Group By%s is ambiguous",sortgroupby->name);
1752+
elog(WARN,"Order/Group By'%s' is ambiguous",sortgroupby->name);
17591753
else
17601754
target_result=target;
17611755
}
17621756
}
17631757
else
17641758
{
17651759
if (target_result!=NULL)
1766-
elog(WARN,"Order/Group By%s is ambiguous",sortgroupby->name);
1760+
elog(WARN,"Order/Group By'%s' is ambiguous",sortgroupby->name);
17671761
else
17681762
target_result=target;
17691763
}
@@ -2069,7 +2063,7 @@ setup_tlist(char *attname, Oid relid)
20692063

20702064
attno=get_attnum(relid,attname);
20712065
if (attno<0)
2072-
elog(WARN,"cannot reference attribute%s of tuple params/return values for functions",attname);
2066+
elog(WARN,"cannot reference attribute'%s' of tuple params/return values for functions",attname);
20732067

20742068
typeid=find_atttype(relid,attname);
20752069
resnode=makeResdom(1,
@@ -2171,7 +2165,7 @@ ParseComplexProjection(ParseState *pstate,
21712165
else
21722166
{
21732167
elog(WARN,
2174-
"Function%s has bad returntype %d",
2168+
"Function'%s' has bad returntype %d",
21752169
funcname,argtype);
21762170
}
21772171
}
@@ -2240,7 +2234,7 @@ ParseComplexProjection(ParseState *pstate,
22402234

22412235
}
22422236

2243-
elog(WARN,"Function%s has bad returntype %d",
2237+
elog(WARN,"Function'%s' has bad returntype %d",
22442238
funcname,argtype);
22452239
break;
22462240
}
@@ -2304,7 +2298,7 @@ ParseFunc(ParseState *pstate, char *funcname, List *fargs, int *curr_resno)
23042298
{
23052299
first_arg=lfirst(fargs);
23062300
if (first_arg==NULL)
2307-
elog(WARN,"function%s does not allow NULL input",funcname);
2301+
elog(WARN,"function'%s' does not allow NULL input",funcname);
23082302
}
23092303

23102304
/*
@@ -2375,7 +2369,7 @@ ParseFunc(ParseState *pstate, char *funcname, List *fargs, int *curr_resno)
23752369
}
23762370
else
23772371
elog(WARN,
2378-
"Type%s is not a relation type",
2372+
"Type'%s' is not a relation type",
23792373
tname(get_id_type(toid)));
23802374
argrelid=typeid_get_relid(toid);
23812375

@@ -2477,7 +2471,7 @@ ParseFunc(ParseState *pstate, char *funcname, List *fargs, int *curr_resno)
24772471
if (exprType(pair)==UNKNOWNOID&&
24782472
!IsA(pair,Const))
24792473
{
2480-
elog(WARN,"ParseFunc: no function named%s that takes in an unknown type as argument #%d",funcname,nargs);
2474+
elog(WARN,"ParseFunc: no function named'%s' that takes in an unknown type as argument #%d",funcname,nargs);
24812475
}
24822476
else
24832477
toid=exprType(pair);
@@ -2520,7 +2514,7 @@ ParseFunc(ParseState *pstate, char *funcname, List *fargs, int *curr_resno)
25202514
}
25212515

25222516
if (!exists)
2523-
elog(WARN,"no such attribute or function%s",funcname);
2517+
elog(WARN,"no such attribute or function'%s'",funcname);
25242518

25252519
/* got it */
25262520
funcnode=makeNode(Func);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp