Re: Standard metadata queries - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Standard metadata queries
Date
Msg-id 8982.1209072168@sss.pgh.pa.us
Whole thread Raw
In response to Re: Standard metadata queries  (Steve Atkins <steve@blighty.com>)
Responses Re: Standard metadata queries  (Steve Atkins <steve@blighty.com>)
List pgsql-hackers
Steve Atkins <steve@blighty.com> writes:
> On Apr 24, 2008, at 11:12 AM, Joshua D. Drake wrote:
>> I believe the information_schema is standard.

> Standard, but woefully incomplete (by design).

Sure, because it's restricted to standardized concepts.  Do the adapters
in question need to obtain info about nonstandard things?  One would
hope that they're trying to confine themselves to SQL-standard stuff.

> Also, AIUI, it's fairly slow in use, compared to touching the underlying
> postgresql-specific tables, which would be something that you might
> not care about in design tools but which might be a problem for use in
> an ORM or similar.

This is a fair point, and it's unlikely ever to be fixed completely,
though perhaps we could put a bit more effort into whichever views are
considered performance-critical.

> Given that, I think that using common queries for DBD::Pg, JDBC, Qt,
> etc, etc would probably benefit an awful lot of users and reduce the
> amount of duplicated effort across the various APIs. Ripping the
> existing queries out of one or more of those and just having a few
> people who understand pg_* sanity check them seems like it might
> be a decent place to start, if nobody has already done something
> similar.

AFAIR, the only times we've heard from adapter authors were when they
couldn't make something work at all :-(.  A review project like you
propose would be worthwhile.  Aside from possibly helping the adapter
authors, it would give us a better sense of which changes to the system
catalogs to avoid because they'd be likely to break clients.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Proposed patch - psql wraps at window width
Next
From: Steve Atkins
Date:
Subject: Re: Standard metadata queries