Re: RangeTblEntry modifications

From: Alex Pilosov <alex(at)pilosoft(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: RangeTblEntry modifications
Date: 2001-07-01 12:58:28
Message-ID: Pine.BSO.4.10.10107010857360.7004-100000@spider.pilosoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, 1 Jul 2001, Tom Lane wrote:

> Alex Pilosov <alex(at)pilosoft(dot)com> writes:
> > I think I just understood what you were saying: having tupleDesc in RTE is
> > not kosher, because RTE can last longer than a given tupleDesc?
>
> Depends where you got the tupleDesc from --- if you copy it into the
> parse context then it's OK in terms of not disappearing. However,
> that doesn't mean it's still *valid*. Consider
>
> begin;
> declare foo cursor for select * from bar;
> create view v1 as select * from cursor foo;
> end;
>
> Now the cursor foo is no more, but v1 still exists ... what happens
> when we try to select from v1?
I believe it will fail in the executor trying to open the portal...That's
the expected behaviour, right?

-alex

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Vince Vielhaber 2001-07-01 23:27:25 Re: Now it's my turn...
Previous Message Tom Lane 2001-07-01 04:47:41 Re: RangeTblEntry modifications