Re: [HACKERS] psql code to be obducted by alien (me)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] psql code to be obducted by alien (me)
Дата
Msg-id 12043.938300255@sss.pgh.pa.us
обсуждение исходный текст
Ответ на psql code to be obducted by alien (me)  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> I am also tempted to drop the use of libpq's PQprint so that it can be
> phased out, since I suspect hardly anyone else uses it and no one is
> really happy with it.

If you write new printing code for psql, please consider making it a
separate module that could be included into libpq so other applications
can use it.

Another part of psql that should be made as independent as possible
is the support for \copy.  I recall a number of people asking in the
past how they can read and write tables to files in their own apps.
There's not that much code involved, but psql is such a mess that it's
hard to point to a chunk of code they can borrow.

BTW, something closely related to \copy that's languishing on the TODO
list is the ability to load the contents of a local file into a Large
Object or write the data out again.  This would be the equivalent of the
server-side operations lo_import and lo_export, but reading or writing a
file in psql's environment instead of the backend's.  Basically a wrapper
around lo_read/lo_write, not much to it but it needs done...

Anyway, I guess the point of all this is that psql should be not only
a useful app in its own right, but a source of how-to examples and
borrowable code for people making their own client apps.  I think you
will move it a long way in that direction just by doing cleanup, but
please keep the notion in mind while you work.
        regards, tom lane


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

Предыдущее
От: Leon
Дата:
Сообщение: Profiling?
Следующее
От: Tom Lane
Дата:
Сообщение: Making proiscachable believable