Re: BUG #11526: WITH tables not accessible from function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: bryan(at)unhwildhats(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #11526: WITH tables not accessible from function
Date: 2014-09-30 20:46:29
Message-ID: 20607.1412109989@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

bryan(at)unhwildhats(dot)com writes:
> I need to access a temporary table created by a WITH statement in a function
> called from the subsequent SELECT. I could not find any documentation
> forbidding this behavior.

You're imagining that a WITH clause creates an actual table. It does not,
any more than, say, a function call in the FROM clause does. It's just
a name accessible within the query the WITH is attached to. Sorry.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Paul Dasari 2014-09-30 20:49:15 Re: BUG #11528: Max Index Keys
Previous Message Tom Lane 2014-09-30 20:44:27 Re: BUG #11528: Max Index Keys