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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: \d type queries - why not views in system catalog?!?
Дата
Msg-id 6857.1042498651@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: \d type queries - why not views in system catalog?!?  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: \d type queries - why not views in system catalog?!?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: PostgreSQL site, put up or shut up?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: \d type queries - why not views in system catalog?!?