| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: More schema queries |
| Date: | 2002-05-17 23:01:11 |
| Message-ID: | 23101.1021676471@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
"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.
>> Curious. I have not noticed much of any change in postmaster
>> startup time on Unix. Can you run a profile or something to
>> see where the time is going?
> Probably, but I'd need hand-holding as I don't have a clue how to do
> that.
I'm not sure how to do it on Cygwin, either. On Unix you'd build a
profilable backend executable using
cd pgsql/src/backend
gmake clean
gmake PROFILE="-pg" all
install same, run it, and then use gprof on the gmon.out file dumped
at postmaster termination. Dunno if it has to be done differently
on Cygwin.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2002-05-17 23:10:04 | Re: Error on PQputline() |
| Previous Message | Dann Corbit | 2002-05-17 23:00:18 | Error on PQputline() |