Skip to content

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy