agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Rob Sargent <robjsargent@gmail.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: CTEs and re-use
Date: Tue, 11 Apr 2017 20:47:45 -0600
Message-ID: <2B9243AD-09BA-4E0D-9805-5A1E1409F0FA@gmail.com> (raw)
In-Reply-To: <CAKFQuwZE1sxyUNjC53aOKZzAg7S4gxeNSVyfCbSnTCAoYYu+7w@mail.gmail.com>
References: <c0a06409-5cca-901b-48f8-2740f38eaba4@gmail.com>
<CAKFQuwaaCewCWEL0ojyzjgS7db09hATgT77SZquoF1CzPSC3bg@mail.gmail.com>
<286BDFF8-0632-4B2D-92C8-5B7B6B39E059@gmail.com>
<CAKFQuwZE1sxyUNjC53aOKZzAg7S4gxeNSVyfCbSnTCAoYYu+7w@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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 product of 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
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
view thread (6+ messages) latest in thread
Message-ID: <2B9243AD-09BA-4E0D-9805-5A1E1409F0FA@gmail.com>
Permalink: ../2B9243AD-09BA-4E0D-9805-5A1E1409F0FA@gmail.com/
Also on: postgresql.org/message-id/2B9243AD-09BA-4E0D-9805-5A1E1409F0FA@gmail.com
reply
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: robjsargent@gmail.com, david.g.johnston@gmail.com
Subject: Re: CTEs and re-use
In-Reply-To: <2B9243AD-09BA-4E0D-9805-5A1E1409F0FA@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox