Обсуждение: proposal - psql output file write mode

Поиск
Список
Период
Сортировка

proposal - psql output file write mode

От
Pavel Stehule
Дата:
Hi

I am playing with pspg and inotify support. It is working pretty well and now can be nice if forwarding to output file can be configured little bit more. Now, only append mode is supported. But append mode doesn't work with pspg pager. So I propose new pset option "file_output_mode" with two possible values "append" (default, current behave) and "rewrite" (new mode).

Usage:

\pset file_ouput_mode rewrite

In this mode, the file is opened before printing and it is closed after printing.

What do you think about this proposal?

Regards

Pavel


Re: proposal - psql output file write mode

От
Pavel Stehule
Дата:


so 28. 3. 2020 v 6:30 odesílatel Pavel Stehule <pavel.stehule@gmail.com> napsal:
Hi

I am playing with pspg and inotify support. It is working pretty well and now can be nice if forwarding to output file can be configured little bit more. Now, only append mode is supported. But append mode doesn't work with pspg pager. So I propose new pset option "file_output_mode" with two possible values "append" (default, current behave) and "rewrite" (new mode).

Usage:

\pset file_ouput_mode rewrite

In this mode, the file is opened before printing and it is closed after printing.

What do you think about this proposal?

I tried to implement this feature and it doesn't look like good idea. There is not trivial implementation, and looks so costs are higher than benefits.

Pavel


Regards

Pavel