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

From Tom Lane
Subject Re: What's the CURRENT schema ?
Date
Msg-id 25283.1018025717@sss.pgh.pa.us
Whole thread Raw
In response to Re: What's the CURRENT schema ?  (Fernando Nasser <fnasser@redhat.com>)
Responses Re: What's the CURRENT schema ?  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
List pgsql-hackers
Fernando Nasser <fnasser@redhat.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?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Justin Clift
Date:
Subject: Re: [Fwd: AW: UB-Tree's and patents]
Next
From: Joe Conway
Date:
Subject: Re: PQescapeBytea is not multibyte aware