pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thorsten Schöning <tschoening@am-soft.de>
To: pgsql-general@lists.postgresql.org
Subject: Re: Concurrenctly running CREATE TEMP TABLE IF NOT EXISTS [...] AS [...]
Date: Mon, 8 Jun 2020 16:23:19 +0200
Message-ID: <1451529478.20200608162319@am-soft.de> (raw)
In-Reply-To: <5fd32bf1-164c-742f-9e46-7c9cc547a0e1@gmail.com>
References: <1102807465.20200608101409@am-soft.de>
	<5fd32bf1-164c-742f-9e46-7c9cc547a0e1@gmail.com>

Guten Tag Ron,
am Montag, 8. Juni 2020 um 15:35 schrieben Sie:

> Would a set of GLOBAL temporary tables be a better fit for your problem
> (eliminating the need to create temporary tables each time)?

Do you mean plain tables simply created using CREATE TABLE or is there
some additional concept of temporary tables I'm not aware of? Because I
thought truly temporary tables are always session-specific: 

> Temporary tables are automatically dropped at the end of a session,
> or optionally at the end of the current transaction (see ON COMMIT
> below).

https://www.postgresql.org/docs/9.5/sql-createtable.html

It totally depends on runtime and users if those tables are necessary
at all in theory. So the benefit of using session-private once
automatically maintained in my opinion is that I can introduce them
easily as necessary without customizing my schema. My schema and all
changes to it are versioned and I would like to avoid the maintenance
overhead adding temp-tables which can easily change with the
implementation using them.

OTOH, if they are necessary at all at some point, the schema might be
a good place to make aware of them, document their usage and stuff. i
will think about that, so thanks for the hint!

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail: Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow






view thread (11+ messages)  latest in thread

Message-ID: <1451529478.20200608162319@am-soft.de>
Permalink:  ../1451529478.20200608162319@am-soft.de/
Also on:    postgresql.org/message-id/1451529478.20200608162319@am-soft.de

 · 

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: tschoening@am-soft.de
  Subject: Re: Concurrenctly running CREATE TEMP TABLE IF NOT EXISTS [...] AS [...]
  In-Reply-To: <1451529478.20200608162319@am-soft.de>
  References: <1102807465.20200608101409@am-soft.de> <5fd32bf1-164c-742f-9e46-7c9cc547a0e1@gmail.com> <1451529478.20200608162319@am-soft.de>

* 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