Re: [GENERAL] Creating temp tables inside read only transactions - Mailing list pgsql-hackers

From Florian Pflug
Subject Re: [GENERAL] Creating temp tables inside read only transactions
Date
Msg-id 2442397E-2BD5-424E-AF2E-E1F4CDCDA6EB@phlo.org
Whole thread Raw
In response to Re: [GENERAL] Creating temp tables inside read only transactions  (Darren Duncan <darren@darrenduncan.net>)
List pgsql-hackers
On Jul8, 2011, at 08:21 , Darren Duncan wrote:
> Also, the proper way to do temporary tables would be to put them in
> another database than the main one, where the whole other database
> has the property of being temporary.

FWIW, Microsoft SQL Server does it that way, and as a result temporary
tables are severely restricted in a number of ways.

For example, custom datatypes defined in a non-temporary database
cannot be used in temporary table definitions, because datatypes may
only be used within the database they're defined in. You can of course
re-define the data type in the temporary database, but then obviously
have to do so every time you start new session because you start out
with an empty tempdb.

best regards,
Florian Pflug


pgsql-hackers by date:

Previous
From: "David Johnston"
Date:
Subject: Re: [GENERAL] Creating temp tables inside read only transactions
Next
From: Florian Pflug
Date:
Subject: Re: Need help understanding pg_locks