Re: [SQL] CTEs and re-use

Поиск
Список
Период
Сортировка
От Rob Sargent
Тема Re: [SQL] CTEs and re-use
Дата
Msg-id EBE13082-9D2F-4E9F-BA86-386B93D15FAA@gmail.com
обсуждение исходный текст
Ответ на [SQL] CTEs and re-use  (Rob Sargent <robjsargent@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Rob Sargent
Дата:
Сообщение: Re: [SQL] CTEs and re-use
Следующее
От: Rosser Schwarz
Дата:
Сообщение: Re: [SQL] CTEs and re-use