pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mladen Gogala <gogala.mladen@gmail.com>
To: Adrian Klaver <adrian.klaver@aklaver.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: database design with temporary tables
Date: Sun, 29 Aug 2021 16:35:47 -0400
Message-ID: <aeb0063f-c820-2970-2a3b-3820c9eef239@gmail.com> (raw)
In-Reply-To: <c445dbed-f832-273a-c183-afb7a41b5186@aklaver.com>
References: <IRuoNkHXtafj7Vm_RhI-AB56qHPVRSDRD95NmX9lxlsQvmsK361slJ4ONjoP0GvX8tNsyXUD5KF1TW21uJyh15BDdrQCDHFDvPXa1Nu-eVE=@protonmail.com>
	<0e9373c9-565c-5edb-5c71-b3ea40be9473@aklaver.com>
	<ebb9eeb4-8815-65a9-c63e-3d38ff044116@gmail.com>
	<c445dbed-f832-273a-c183-afb7a41b5186@aklaver.com>


On 8/29/21 2:26 PM, Adrian Klaver wrote:
> The pool is maintained, the individual connections(sessions) come and 
> go. Otherwise there would be no point to having a pool. Every time the 
> connection(session) is closed the temporary table disappears. 

Yes, you're right. And that is very convenient. I also prefer temporary 
tables with ON COMMIT DELETE ROWS so that I don't have leftovers between 
transactions. There is also pgtt extension by Giles Darold which 
emulates Oracle global temporary tables:

https://github.com/darold/pgtt#use-of-the-extension

I have never particularly liked Oracle's implementation of temporary 
tables, local or global,  so I have no problems with questions like 
that. BTW, I have compared Oracle's implementation with other 
implementations here:

https://dbwhisperer.wordpress.com/2019/03/18/private-temporary-tables-oracle-18c/

I could have used Postgres instead of the SQL Server, the comparison 
would read the same, except for the "#" character which denotes 
temporary table in SQL Server.

Regards


-- 
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com






view thread (16+ messages)

Message-ID: <aeb0063f-c820-2970-2a3b-3820c9eef239@gmail.com>
Permalink:  ../aeb0063f-c820-2970-2a3b-3820c9eef239@gmail.com/
Also on:    postgresql.org/message-id/aeb0063f-c820-2970-2a3b-3820c9eef239@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: gogala.mladen@gmail.com, adrian.klaver@aklaver.com
  Subject: Re: database design with temporary tables
  In-Reply-To: <aeb0063f-c820-2970-2a3b-3820c9eef239@gmail.com>
  References: <IRuoNkHXtafj7Vm_RhI-AB56qHPVRSDRD95NmX9lxlsQvmsK361slJ4ONjoP0GvX8tNsyXUD5KF1TW21uJyh15BDdrQCDHFDvPXa1Nu-eVE=@protonmail.com> <0e9373c9-565c-5edb-5c71-b3ea40be9473@aklaver.com> <ebb9eeb4-8815-65a9-c63e-3d38ff044116@gmail.com> <c445dbed-f832-273a-c183-afb7a41b5186@aklaver.com> <aeb0063f-c820-2970-2a3b-3820c9eef239@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox