Re: What's the CURRENT schema ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Fernando Nasser <fnasser(at)redhat(dot)com>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: What's the CURRENT schema ?
Date: 2002-04-05 16:55:17
Message-ID: 25283.1018025717@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2002-04-05 17:21:42 Re: PQescapeBytea is not multibyte aware
Previous Message Fernando Nasser 2002-04-05 16:49:29 Re: What's the CURRENT schema ?