|
7 | 7 | *
|
8 | 8 | *
|
9 | 9 | * 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 $ |
11 | 11 | *
|
12 | 12 | *-------------------------------------------------------------------------
|
13 | 13 | */
|
@@ -900,7 +900,7 @@ transformIdent(ParseState *pstate, Node *expr, int precedence)
|
900 | 900 | }
|
901 | 901 |
|
902 | 902 | if (result==NULL)
|
903 |
| -elog(WARN,"attribute\"%s\" not found",ident->name); |
| 903 | +elog(WARN,"attribute'%s' not found",ident->name); |
904 | 904 |
|
905 | 905 | returnresult;
|
906 | 906 | }
|
@@ -1028,8 +1028,8 @@ exprType(Node *expr)
|
1028 | 1028 |
|
1029 | 1029 | /*
|
1030 | 1030 | * 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) |
1033 | 1033 | */
|
1034 | 1034 | staticList*
|
1035 | 1035 | expandAllTables(ParseState*pstate)
|
@@ -1173,7 +1173,7 @@ makeTargetNames(ParseState *pstate, List *cols)
|
1173 | 1173 | varattno(pstate->p_target_relation,name);
|
1174 | 1174 | foreach(nxt,lnext(tl))
|
1175 | 1175 | 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); |
1177 | 1177 | }
|
1178 | 1178 | }
|
1179 | 1179 |
|
@@ -1209,15 +1209,9 @@ transformTargetList(ParseState *pstate, List *targetlist)
|
1209 | 1209 | handleTargetColname(pstate,&res->name,NULL,identname);
|
1210 | 1210 |
|
1211 | 1211 | /*
|
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) |
1214 | 1214 | */
|
1215 |
| - |
1216 |
| -/* |
1217 |
| - * names (even though they can be stored in Ident |
1218 |
| - * nodes, |
1219 |
| - */ |
1220 |
| -/* too)*/ |
1221 | 1215 | expr=transformIdent(pstate, (Node*)res->val,EXPR_COLUMN_FIRST);
|
1222 | 1216 | type_id=exprType(expr);
|
1223 | 1217 | type_len=tlen(get_id_type(type_id));
|
@@ -1755,15 +1749,15 @@ find_targetlist_entry(ParseState *pstate, SortGroupBy *sortgroupby, List *tlist)
|
1755 | 1749 | if (real_rtable_pos==test_rtable_pos)
|
1756 | 1750 | {
|
1757 | 1751 | 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); |
1759 | 1753 | else
|
1760 | 1754 | target_result=target;
|
1761 | 1755 | }
|
1762 | 1756 | }
|
1763 | 1757 | else
|
1764 | 1758 | {
|
1765 | 1759 | 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); |
1767 | 1761 | else
|
1768 | 1762 | target_result=target;
|
1769 | 1763 | }
|
@@ -2069,7 +2063,7 @@ setup_tlist(char *attname, Oid relid)
|
2069 | 2063 |
|
2070 | 2064 | attno=get_attnum(relid,attname);
|
2071 | 2065 | 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); |
2073 | 2067 |
|
2074 | 2068 | typeid=find_atttype(relid,attname);
|
2075 | 2069 | resnode=makeResdom(1,
|
@@ -2171,7 +2165,7 @@ ParseComplexProjection(ParseState *pstate,
|
2171 | 2165 | else
|
2172 | 2166 | {
|
2173 | 2167 | elog(WARN,
|
2174 |
| -"Function%s has bad returntype %d", |
| 2168 | +"Function'%s' has bad returntype %d", |
2175 | 2169 | funcname,argtype);
|
2176 | 2170 | }
|
2177 | 2171 | }
|
@@ -2240,7 +2234,7 @@ ParseComplexProjection(ParseState *pstate,
|
2240 | 2234 |
|
2241 | 2235 | }
|
2242 | 2236 |
|
2243 |
| -elog(WARN,"Function%s has bad returntype %d", |
| 2237 | +elog(WARN,"Function'%s' has bad returntype %d", |
2244 | 2238 | funcname,argtype);
|
2245 | 2239 | break;
|
2246 | 2240 | }
|
@@ -2304,7 +2298,7 @@ ParseFunc(ParseState *pstate, char *funcname, List *fargs, int *curr_resno)
|
2304 | 2298 | {
|
2305 | 2299 | first_arg=lfirst(fargs);
|
2306 | 2300 | 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); |
2308 | 2302 | }
|
2309 | 2303 |
|
2310 | 2304 | /*
|
@@ -2375,7 +2369,7 @@ ParseFunc(ParseState *pstate, char *funcname, List *fargs, int *curr_resno)
|
2375 | 2369 | }
|
2376 | 2370 | else
|
2377 | 2371 | elog(WARN,
|
2378 |
| -"Type%s is not a relation type", |
| 2372 | +"Type'%s' is not a relation type", |
2379 | 2373 | tname(get_id_type(toid)));
|
2380 | 2374 | argrelid=typeid_get_relid(toid);
|
2381 | 2375 |
|
@@ -2477,7 +2471,7 @@ ParseFunc(ParseState *pstate, char *funcname, List *fargs, int *curr_resno)
|
2477 | 2471 | if (exprType(pair)==UNKNOWNOID&&
|
2478 | 2472 | !IsA(pair,Const))
|
2479 | 2473 | {
|
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); |
2481 | 2475 | }
|
2482 | 2476 | else
|
2483 | 2477 | toid=exprType(pair);
|
@@ -2520,7 +2514,7 @@ ParseFunc(ParseState *pstate, char *funcname, List *fargs, int *curr_resno)
|
2520 | 2514 | }
|
2521 | 2515 |
|
2522 | 2516 | if (!exists)
|
2523 |
| -elog(WARN,"no such attribute or function%s",funcname); |
| 2517 | +elog(WARN,"no such attribute or function'%s'",funcname); |
2524 | 2518 |
|
2525 | 2519 | /* got it */
|
2526 | 2520 | funcnode=makeNode(Func);
|
|