mirror of
https://github.com/postgres/postgres.git
synced 2025-06-06 00:02:36 -04:00
Fix poor choice of error message in corner cases.
This commit is contained in:
parent
b066d9e4bc
commit
3dd1ca035d
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/parser/parse_func.c,v 1.167 2004/04/02 19:06:58 tgl Exp $
|
* $PostgreSQL: pgsql/src/backend/parser/parse_func.c,v 1.168 2004/04/02 21:30:44 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -1221,7 +1221,8 @@ unknown_attribute(ParseState *pstate, Node *relref, char *attname)
|
|||||||
{
|
{
|
||||||
RangeTblEntry *rte;
|
RangeTblEntry *rte;
|
||||||
|
|
||||||
if (IsA(relref, Var))
|
if (IsA(relref, Var) &&
|
||||||
|
((Var *) relref)->varattno == InvalidAttrNumber)
|
||||||
{
|
{
|
||||||
/* Reference the RTE by alias not by actual table name */
|
/* Reference the RTE by alias not by actual table name */
|
||||||
rte = GetRTEByRangeTablePosn(pstate,
|
rte = GetRTEByRangeTablePosn(pstate,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user