From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Alphasoft" <ico(at)alphasoft-bg(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: problem with view in 7.3 |
Date: | 2002-12-04 20:02:43 |
Message-ID: | 17789.1039032163@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
"Alphasoft" <ico(at)alphasoft-bg(dot)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
*** 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;
}
From | Date | Subject | |
---|---|---|---|
Next Message | Mike Diehl | 2002-12-04 22:08:35 | Ran out of connections |
Previous Message | Pedro Igor | 2002-12-04 19:19:16 | Inheritance in PostgreSQL limitation |