Skip site navigation (1) Skip section navigation (2)

Re: Standard metadata queries

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Steve Atkins <steve(at)blighty(dot)com>
Cc: PostgreSQL-development list <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Standard metadata queries
Date: 2008-04-24 21:22:48
Message-ID: 8982.1209072168@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Steve Atkins <steve(at)blighty(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: Steve AtkinsDate: 2008-04-24 22:04:10
Subject: Re: Standard metadata queries
Previous:From: Bruce MomjianDate: 2008-04-24 20:38:14
Subject: Re: Proposed patch - psql wraps at window width

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group