Re: psql > split > queries & output

Поиск
Список
Период
Сортировка
От Wim Bertels
Тема Re: psql > split > queries & output
Дата
Msg-id 8b9f341707fd81d0ab90eedb654432eec4ffe847.camel@ucll.be
обсуждение исходный текст
Ответ на Re: psql > split > queries & output  ("Daniel Verite" <daniel@manitou-mail.org>)
Список pgsql-general
Daniel Verite schreef op do 03-12-2020 om 16:32 [+0100]:
>     Wim Bertels wrote:
> 
> > but interactively this doesn't seem to work
> 
> Interactively something like this might do the job:
> 
> $  PSQL_HISTORY=/tmp/queries.txt psql  -L /tmp/logfile.txt
> 
> After running some queries, and a clean exit from psql:

yes indeed,
but as i mentioned in the beginning,
i can't consult the current history in a side pane,
only with option /s
(while still running the psql session)

(side note:
$ echo $PSQL_HISTORY (is empty)

$ psql
psql (12.5 (Debian 12.5-1.pgdg100+1))
Type "help" for help.
# \set HISTFILE /tmp/test
# select 1;

has no effect, /tmp/test is not created,
everything is put into ~.psql_history )

(debian specific?, intended?, or bug?)


> 
> $ cat /tmp/queries.txt
> select 1;
> select 2;
> 
> 
> $ cat /tmp/logfile.txt 
> ********* QUERY **********
> select 1;
> **************************
> 
>  ?column? 
> ----------
>     1
> (1 row)
> 
> ********* QUERY **********
> select 2;
> **************************
> 
>  ?column? 
> ----------
>     2
> (1 row)
> 
> 
> Best regards,
-- 
mvg,
Wim 
--
https://coronalert.be

--
In India, "cold weather" is merely a conventional phrase and has come into
use through the necessity of having some way to distinguish between weather
which will melt a brass door-knob and weather which will only make it mushy.
        -- Mark Twain




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

Предыдущее
От: Olivier Gautherot
Дата:
Сообщение: Re: Alter the column data type of the large data volume table.
Следующее
От: Olivier Gautherot
Дата:
Сообщение: Re: Alter the column data type of the large data volume table.