From: | Hannu Krosing <hannu(at)tm(dot)ee> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Dave Page <dpage(at)vale-housing(dot)co(dot)uk>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: More schema queries |
Date: | 2002-05-20 15:17:52 |
Message-ID: | 1021907872.14279.278.camel@taru.tm.ee |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, 2002-05-18 at 01:01, Tom Lane wrote:
> "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> writes:
> > It doesn't work quite like that anyway.
>
> Oh, so essentially you want to simulate the namespace search on the
> application side. I see.
>
> > Anyway, current_schemas() seems ideal, thanks.
>
> It may not be exactly what you need, because it doesn't tell you about
> implicitly searched schemas --- which always includes pg_catalog and
> will include a temp namespace if you've activated one. For instance,
> if current_schemas claims the search path is
>
> regression=> select current_schemas();
> current_schemas
> -----------------
> {tgl,public}
> (1 row)
>
> then the real path is effectively {pg_catalog,tgl,public}, or possibly
> {pg_temp_NNN,pg_catalog,tgl,public}.
>
> There was already some discussion about making a variant version of
> current_schemas() that would tell you the Whole Truth, including the
> implicitly searched schemas. Seems like we'd better do that; otherwise
> we'll find people hardwiring knowledge of these implicit search rules
> into their apps, which is probably a bad idea.
>
> Anyone have a preference about what to call it? I could see making a
> version of current_schemas() that takes a boolean parameter, or we
> could choose another function name for the implicit-schemas-too version.
or we could make another function with the same name :)
current_schemas('full')
--------------
Hannu
From | Date | Subject | |
---|---|---|---|
Next Message | Bear Giles | 2002-05-20 15:22:31 | Re: SASL, compression? |
Previous Message | Dave Page | 2002-05-20 15:11:36 | Re: More schema queries |