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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, 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:57:31
Message-ID: 6857.1042498651@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> 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.

I think that the proposal is to take describe.c more or less
lock-stock-and-barrel out of psql and put it in the backend instead.
It doesn't matter whether the views are orthogonal or useful for
non-interactive purposes; they're defined to do whatever we think
psql should show.

The question is whether this gives us a useful amount of decoupling of
psql from the backend version. Certainly the describe.c code is the
stuff most subject to breakage across versions, but there are a lot of
other aspects of psql that could still break. One fairly obvious
example of backend-dependent psql code that won't be helped this way is
the tab completion code.

While I don't have any strong objection to moving the guts of these
queries to the backend, I can't get real excited about it either;
I suspect that psql will still be pretty version-dependent.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-01-14 00:15:58 Re: \d type queries - why not views in system catalog?!?
Previous Message Tom Lane 2003-01-13 22:50:10 Re: targetlist functions part 1 (was [HACKERS] targetlist