Re: \d type queries - why not views in system catalog?!?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: greg(at)turnstep(dot)com, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: \d type queries - why not views in system catalog?!?
Date: 2003-01-13 22:46:28
Message-ID: Pine.LNX.4.44.0301132301130.789-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-01-13 22:49:54 Re: PostgreSQL site, put up or shut up?
Previous Message Peter Eisentraut 2003-01-13 22:46:04 Re: targetlist functions part 1 (was [HACKERS] targetlist