Re: RFD: schemas and different kinds of Postgres objects

From: Fernando Nasser <fnasser(at)redhat(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: RFD: schemas and different kinds of Postgres objects
Date: 2002-01-22 21:26:33
Message-ID: 3C4DD909.F26FD0D1@redhat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
>
> Fernando Nasser <fnasser(at)redhat(dot)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(at)redhat(dot)com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-01-22 21:34:47 Re: RFD: schemas and different kinds of Postgres objects
Previous Message Tom Lane 2002-01-22 21:16:12 Re: TODO question and claim