Re: Schemas: status report, call for developers

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>
Cc: Hannu Krosing <hannu(at)tm(dot)ee>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Schemas: status report, call for developers
Date: 2002-05-06 15:43:04
Message-ID: 5801.1020699784@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

"Nigel J. Andrews" <nandrews(at)investsystems(dot)co(dot)uk> writes:
> Coming back to this subject if I may but only briefly, I hope. How
> about making a slight change to current_schemas() and including an
> optional argument such that something like:
> current_schemas(1)
> returns the complete list of schemas in the search path including the
> implicit temporary space and the pg_catalog (if not already listed
> obviously), while current_schemas() and current_schemas(0) behave as
> now.

I don't really care for that syntax, but certainly we could talk about
providing a version of current_schemas that tells the Whole Truth.

> Having something like this would enable client's like PgAccess to
> determine the complete list of visible objects.

Well, no, it wouldn't. Say there are multiple tables named foo in
different namespaces in your search path (eg, a temp table hiding a
permanent table of the same name). A test like "where current_schemas
*= relnamespace" won't reflect this correctly.

I'm suspecting that what we really need is some kind of
"is_visible_table()" test function, and then you'd do
select * from pg_class where is_visible_table(oid);
At least I've not been able to think of a better idea than that.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2002-05-06 16:51:15 Set Returning Functions (SRF) - request for patch review and comment
Previous Message Nigel J. Andrews 2002-05-06 15:31:05 Re: Schemas: status report, call for developers

Browse pgsql-interfaces by date

  From Date Subject
Next Message Nigel J. Andrews 2002-05-06 19:12:52 Re: Schemas: status report, call for developers
Previous Message Nigel J. Andrews 2002-05-06 15:31:05 Re: Schemas: status report, call for developers