Re: How to capture an interactive psql session in a log file?

Поиск
Список
Период
Сортировка
От Erik Jones
Тема Re: How to capture an interactive psql session in a log file?
Дата
Msg-id 3FCD8AE5-794A-4C4C-BF79-0DC4A39D5955@engineyard.com
обсуждение исходный текст
Ответ на Re: How to capture an interactive psql session in a log file?  (Gordon Shannon <gordo169@gmail.com>)
Список pgsql-general
On Apr 2, 2009, at 11:07 PM, Gordon Shannon wrote:

>
> That does the trick, awesome!
>
> I do think it would be great if psql had a "stderr" capture in
> addition to
> stdout.

While the recommendations to use script are perfect for the use case
of capturing everything, including input, I think it's worth
mentioning that there was some discussion not too long ago to give
psql better IO redirection capabilities.  The suggestion I like was
something along the lines of

pagila# \o > stdout.txt 2> stderr.txt

as the meaning of that should be immediately obvious to most *nix
users and would also allow

pagila# \o > allout.txt 2>&

and this would default to stdout for backwards compatibility (and
simplicity)

pagila# \o stdout.txt

Erik Jones, Database Administrator
Engine Yard
Support, Scalability, Reliability
866.518.9273 x 260
Location: US/Pacific
IRC: mage2k






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

Предыдущее
От: Sam Mason
Дата:
Сообщение: Re: slow select in big table
Следующее
От: Tom Lane
Дата:
Сообщение: Re: slow select in big table