Re: \d type queries - why not views in system catalog?!? - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: \d type queries - why not views in system catalog?!?
Date
Msg-id Pine.LNX.4.44.0301132301130.789-100000@localhost.localdomain
Whole thread Raw
In response to Re: \d type queries - why not views in system catalog?!?  (Robert Treat <xzilla@users.sourceforge.net>)
Responses Re: \d type queries - why not views in system catalog?!?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Robert Treat writes:

> One idea I've always thought would be nice would be to make full fledged
> C functions out of the \ commands and ship them with the database.

The psql meta-commands are not a nicely designed set of queries that one
would encapsulate into a public library interface.  They are created for
interactive use, representing precomposed views of the database that are
thought to be useful.  If the ideas of usefulness change, then the
commands might change.

If you want to create a set of views or functions for noninteractive use
by client applications, then you need to step back and create maximally
decomposed views of the database that can be combined in all possible
ways.  The SQL information schema is such a set, but the information is
perhaps too limited for some applications.  (But I urge you too look
first.)  But any other set would have to be designed on similar
principles.

-- 
Peter Eisentraut   peter_e@gmx.net



pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: \d type queries - why not views in system catalog?!?
Next
From: Bruce Momjian
Date:
Subject: Re: PostgreSQL site, put up or shut up?