Re: Schemas: status report, call for developers - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Schemas: status report, call for developers
Date
Msg-id 4870.1020227917@sss.pgh.pa.us
Whole thread Raw
In response to Re: Schemas: status report, call for developers  (Ian Barwick <barwick@gmx.net>)
Responses Re: Schemas: status report, call for developers  (Ian Barwick <barwick@gmx.net>)
List pgsql-hackers
Ian Barwick <barwick@gmx.net> writes:
> How can I restrict the query to the schemas in the 
> current search path, i.e. the schema names returned
> by SELECT current_schemas() ?

Well, this is the issue open for public discussion.

We could define some function along the lines of
"is_visible_table(oid) returns bool", and then you could use
that as a WHERE clause in your query.  But I'm worried about
the performance implications --- is_visible_table() would have
to do several retail probes of the system tables, and I don't
see any way to optimize that across hundreds of table OIDs.

I have a nagging feeling that this could be answered by defining
a view on pg_class that only shows visible tables ... but I don't
quite see how to define that efficiently, either.  Ideas anyone?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [INTERFACES] Schemas: status report, call for developers
Next
From: "Ross J. Reedstrom"
Date:
Subject: Re: [INTERFACES] Schemas: status report, call for developers