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

From Rob Sargent
Subject Re: [SQL] CTEs and re-use
Date
Msg-id EBE13082-9D2F-4E9F-BA86-386B93D15FAA@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:47 PM, David G. Johnston <david.g.johnston@gmail.com> wrote:
>
> On Tuesday, April 11, 2017, Rob Sargent <robjsargent@gmail.com> wrote:
>
> I’m really just bumping into the annoyance of manually dropping the temp table as I work this up (though real
collisionin production would is possible, it would be unlikely) and thought to try to rework the function without the
temptable - that’s the SQL question - and presumed the specifics of the function would come in useful. 
>
>
> I'm not positive what you are thinking here but the names of temporary tables are session-unique.  They are not prone
toconcurrent use namespace collisions and not do not interfere with permanent tables either.  They are placed into a
temporaryschema that is only visible to the current session. 
>
> David J.
Of course ‘on commit drop’ works like a charm.
Thanks a ton.
rjs




pgsql-sql by date:

Previous
From: Rob Sargent
Date:
Subject: Re: [SQL] CTEs and re-use
Next
From: Rosser Schwarz
Date:
Subject: Re: [SQL] CTEs and re-use