pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Merlin Moncure <merlin.moncure@rcsonline.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: observations about temporary tables and schemas
Date: Tue, 16 Sep 2003 14:55:14 -0400
Message-ID: <25914.1063738514@sss.pgh.pa.us> (raw)
In-Reply-To: <303E00EBDD07B943924382E153890E5434A9D2@cuthbert.rcsinc.local>
References: <303E00EBDD07B943924382E153890E5434A9D2@cuthbert.rcsinc.local>

"Merlin Moncure" <merlin.moncure@rcsonline.com> writes:
> The other and more interesting way is to manually jump into the
> temporary schema (eg. pg_temp_x) that hosts a temp table constructed by
> another backend.  While this is unlikely to happen in a normal setting,
> the server does allow it.  Following this, backend X can both see and
> manipulate a temporary table set up by backend Y, including table schema
> manipulation. 

Not unless backend X is run by a superuser.  There are privilege
restrictions against this for ordinary users.  The other behaviors you
note are consequences of the current implementation and might change
in future.

> Also, Is the prohibition of using schemas for temp tables a SQL spec
> requirement or a technical consideration?

The SQL spec's notion of temp tables is only tenuously related to ours
in the first place :-(.  However, the spec appears to require that
references to temp tables be unqualified names, so AFAICT it's not
expected that applications can reference more than one schema's worth
of temp tables anyway.

			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <25914.1063738514@sss.pgh.pa.us>
Permalink:  ../25914.1063738514@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25914.1063738514@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, merlin.moncure@rcsonline.com, pgsql-hackers@postgresql.org
  Subject: Re: observations about temporary tables and schemas
  In-Reply-To: <25914.1063738514@sss.pgh.pa.us>

* 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