Re: proposal \gcsv

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: proposal \gcsv
Дата
Msg-id 20200401180931.GA25309@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: proposal \gcsv  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: proposal \gcsv
Список pgsql-hackers
On 2020-Apr-01, Pavel Stehule wrote:

> It can work, but it is not user friendly - my proposal was motivated by
> using some quick csv exports to gplot's pipe.

Can we fix that by adding some syntax to allow command aliases?
So you could add to your .psqlrc something like

\alias \gcsv \pset push all \; \cbuf; \; \pset pop

where the \cbuf is a hypothetical "function" that expands to the current
query buffer.  This needs some refining I guess, but it'd allow you to
create your own shortcuts for the most common features you want without
excessive typing effort.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: snapshot too old issues, first around wraparound and then more.
Следующее
От: Andres Freund
Дата:
Сообщение: Re: snapshot too old issues, first around wraparound and then more.