From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alphasoft <ico@alphasoft-bg.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: problem with view in 7.3
Date: Wed, 04 Dec 2002 15:02:43 -0500
Message-ID: <17789.1039032163@sss.pgh.pa.us> (raw)
In-Reply-To: <000a01c29adb$066fc9e0$0a0546c0@alpha.bg>
References: <000a01c29adb$066fc9e0$0a0546c0@alpha.bg>
"Alphasoft" <ico@alphasoft-bg.com> writes:
> In 7.3 when i am trying to recreate the view I received the folowing error :
> find_expr_references_walker: bogus varno 8
Found it --- thanks for the test case. The patch is attached, if you
want to apply it locally.
regards, tom lane
inline patch 1: src/backend/catalog/dependency.c (+6/-0 lines) download inline-1.patch*** src/backend/catalog/dependency.c.orig Sat Sep 21 20:37:09 2002
--- src/backend/catalog/dependency.c Wed Dec 4 14:45:58 2002
***************
*** 789,794 ****
--- 789,799 ----
else if (rte->rtekind == RTE_JOIN)
{
/* Scan join output column to add references to join inputs */
+ List *save_rtables;+ + /* We must make the context appropriate for join's level */+ save_rtables = context->rtables;+ context->rtables = rtables;
if (var->varattno <= 0 ||
var->varattno > length(rte->joinaliasvars))
elog(ERROR, "find_expr_references_walker: bogus varattno %d",
***************
*** 796,801 ****
--- 801,807 ----
find_expr_references_walker((Node *) nth(var->varattno - 1,
rte->joinaliasvars),
context);
+ context->rtables = save_rtables;
}
return false;
}
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, ico@alphasoft-bg.com
Subject: Re: problem with view in 7.3
In-Reply-To: <17789.1039032163@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox