From: | "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Fernando Nasser" <fnasser(at)redhat(dot)com> |
Cc: | "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>, "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: What's the CURRENT schema ? |
Date: | 2002-04-07 11:44:55 |
Message-ID: | EKEJJICOHDIEMGPNIFIJEEGKHGAA.Inoue@tpf.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
>
> Fernando Nasser <fnasser(at)redhat(dot)com> writes:
> > Christopher Kings-Lynne wrote:
> >> You know, I'm kinda surprised that the spec doesn't define a
> CURRENT_SCHEMA
> >> variable you can query???
>
> > Maybe because it would be the same as CURRENT_USER.
>
> It'd probably make sense for us to have one, though, given that I'm
> intent on not hardwiring the two concepts together as the spec does ;-).
> Although you can interrogate the search path with SHOW, that's not very
> accessible at the SQL level, so an SQL function seems useful too.
>
> I'd be inclined to make CURRENT_SCHEMA return the name of the schema
> that is the default creation target namespace (viz, the front of the
> search path). Thoughts?
I think only one schema other than TEMP or catalog is allowed in the search
path for the resolution of table name. I can call the schema the
CURRENT_SCHEMA.
If the restricted search path is inappropriate for the resolution of
function, type etc
name, you have to provide another path IMHO.
BTW every time I examined SQL99, I can find neither the description
CURRENT_SCHEMA == CURRENT_USER nor the one that the schema
name of an unqualified table name may vary according to the table name.
Probably it's because of my poor English. I'm happy if you could tell me
where to find it.
regards,
Hiroshi Inoue
From | Date | Subject | |
---|---|---|---|
Next Message | Kjartan Бsюуrsson | 2002-04-07 11:49:08 | Re: Indexing and regular expressions |
Previous Message | Oleg Bartunov | 2002-04-07 10:54:27 | Re: Indexing and regular expressions |