Search Postgresql Archives

Re: Means to emulate global temporary table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/11/2017 6:39 PM, Ian Lewis wrote:
Does this mean that a local temporary table created in one function in a database is visible globally throughout the database for the duration of the session?

postgres temporary tables are only visible to the session that creates them. all kind of wierdness would happen if they were somehow visible outside that session, for instance what if another session is accessing one of these hypothetical things, when the session that creates the temp table exits ? and, how do you resolve name conflicts? if session 1 creates temp table ABC, and session 2 creates temp table ABC, how would session 3 know which one to use? conversely, if each session creates unique names, they'd have to build every sql statement from string fragments, this is considered poor practice, and how would session 3 know what unique name to use for one of these other sessions shared temporary tables? all very confusing.


so I'm still not clear here what it is you expect these 'global temp tables' to do, and how they are supposed to behave?


--
john r pierce, recycling bits in santa cruz



--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux