Re: What's the CURRENT schema ? - Mailing list pgsql-hackers

From Fernando Nasser
Subject Re: What's the CURRENT schema ?
Date
Msg-id 3CB2376A.B6DFF086@redhat.com
Whole thread Raw
In response to Re: What's the CURRENT schema ?  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
List pgsql-hackers
Tom Lane wrote:
> 
> "Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
> > However I can see the following at 5.4 Names and Identifiers
> > 11)   If a <schema qualified name> does not contain a <schema name>, then
> >        Case:
> >        a) If the <schema qualified name> is contained in a <schema
> > definition>,
> >        then the <schema name> that is specified or implicit in the <schema
> > definition>
> >       is implicit.
> 
> Yes.  Fernando, our existing CREATE SCHEMA command does not get this
> right for references from views to tables, does it?  It seems to me that
> to get compliant behavior, we'll need to temporarily push the new schema
> onto the front of the namespace search path while parsing view
> definitions inside CREATE SCHEMA.
> 

Correct.  It only takes care of proper setting/checking the schema name
for the view (as is done for tables) that are being created.  Doing as
you suggest would be nice (similar to what we do with the authid).

BTW, I think have to properly fill/check the schema when the grant
objects
are tables/views (I am not sure how functions will be handled).
I will send a patch in later today or tomorrow, unless you want to do
it differently.  I prefer to do in in the parser because I can issue
and error if a grant is for something that is not an object in the
schema being created.


Regards,
Fernando

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


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: timeout implementation issues
Next
From: Hiroshi Inoue
Date:
Subject: Re: timeout implementation issues