pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fernando Nasser <fnasser@redhat.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-hackers@postgresql.org
Subject: Re: RFD: schemas and different kinds of Postgres objects
Date: Tue, 22 Jan 2002 16:26:33 -0500
Message-ID: <3C4DD909.F26FD0D1@redhat.com> (raw)
References: <Pine.LNX.4.30.0201211840260.687-100000@peter.localdomain>
	<12239.1011661590@sss.pgh.pa.us>
	<3C4D8A39.FF79CDC4@redhat.com>
	<15339.1011716171@sss.pgh.pa.us>
	<3C4D96C5.80BBF764@redhat.com>
	<15638.1011718290@sss.pgh.pa.us>
	<3C4DCBDB.689D7201@redhat.com>
	<28199.1011732109@sss.pgh.pa.us>
	<3C4DD34F.CC4D8B6@redhat.com>
	<28557.1011734056@sss.pgh.pa.us>

Tom Lane wrote:
> 
> Fernando Nasser <fnasser@redhat.com> writes:
> > Switches set to historical:
> 
> >   schema search path = (user's own schema, "any" schema, postgres)
> 
> >   [ default creation schema = user's own schema ]
> 
> > The searching in "any" schema (i.e., any owner) will let will find
> > things that where defined the way they are today, i.e., possibly
> > by several different users.
> 
> No, it won't, because nothing will ever get put into that schema.
> (At least not by existing pg_dump scripts, which are the things that
> really need to see the historical behavior.)  The
> default-creation-schema variable has got to point at any/public/
> whatever-we-call it, or you do not have the historical behavior.
> 

You did not understand what I meant by "any".  It is not a schema
called "any".  It is _any_ schema.

Example:

A creates a table (do not specify the schema) so it gets into
the schema named A (as per standard).

B refers to the table without qualifying it...

In the standard case:  look into schema B (=> not found), not in
postgres either.
ERROR: Inv. relation     As the standard requires.

In the historical mode:  look into schema B (=> not found), look into
ANY
schema (finds it in A).  Works as it is today.


Note that I only suggest looking in B first (in the historical case)
because
this will allow for the coexistence of the current mode with a
quasi-compliant
use of SQL-Schemas.  You only need to change the switch if you want
strict
compliance.



-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9



view thread (103+ messages)  latest in thread

Message-ID: <3C4DD909.F26FD0D1@redhat.com>
Permalink:  ../3C4DD909.F26FD0D1@redhat.com/
Also on:    postgresql.org/message-id/3C4DD909.F26FD0D1@redhat.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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: fnasser@redhat.com, tgl@sss.pgh.pa.us, peter_e@gmx.net
  Subject: Re: RFD: schemas and different kinds of Postgres objects
  In-Reply-To: <3C4DD909.F26FD0D1@redhat.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