8000 Fix poor choice of error message in corner cases. · postgrespro/postgres_cluster@3dd1ca0 · GitHub
[go: up one dir, main page]

Skip to content

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

< 8000 /div>
Appearance settings

Commit 3dd1ca0

Browse files
committed
Fix poor choice of error message in corner cases.
1 parent b066d9e commit 3dd1ca0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/backend/parser/parse_func.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/parser/parse_func.c,v 1.167 2004/04/02 19:06:58 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/parser/parse_func.c,v 1.168 2004/04/02 21:30:44 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1221,7 +1221,8 @@ unknown_attribute(ParseState *pstate, Node *relref, char *attname)
12211221
{
12221222
RangeTblEntry *rte;
12231223

1224-
if (IsA(relref, Var))
1224+
if (IsA(relref, Var) &&
1225+
((Var *) relref)->varattno == InvalidAttrNumber)
12251226
{
12261227
/* Reference the RTE by alias not by actual table name */
12271228
rte = GetRTEByRangeTablePosn(pstate,

0 commit comments

Comments
 (0)
0