Re: [SQL] CTEs and re-use - Mailing list pgsql-sql

From Rob Sargent
Subject Re: [SQL] CTEs and re-use
Date
Msg-id 2B9243AD-09BA-4E0D-9805-5A1E1409F0FA@gmail.com
Whole thread Raw
In response to [SQL] CTEs and re-use  (Rob Sargent <robjsargent@gmail.com>)
List pgsql-sql
> On Apr 11, 2017, at 8:43 PM, David G. Johnston <david.g.johnston@gmail.com> wrote:
>
> On Tuesday, April 11, 2017, Rob Sargent <robjsargent@gmail.com> wrote:
> If ‘on commit drop’ does the trick that clears the annoyance but still wondering if there’s a way to retain the
productof the CTE/select for further processing without resorting to a temp table. 
>
> A CTE is a same-query-only temp table.  If you need it to persist post query you have to use a real temporary table.
>
> David J.

Right then.  Thought I might be missing some nifty construct.  A little surprised but oh, well.

Thanks for taking the time.
rjs




pgsql-sql by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: [SQL] CTEs and re-use
Next
From: Rob Sargent
Date:
Subject: Re: [SQL] CTEs and re-use