Re: psql > split > queries & output
| От | Daniel Verite |
|---|---|
| Тема | Re: psql > split > queries & output |
| Дата | |
| Msg-id | 8e16d6cc-3fbb-4789-ac54-b6e92e9d64dd@manitou-mail.org обсуждение исходный текст |
| Ответ на | Re: psql > split > queries & output (Wim Bertels <wim.bertels@ucll.be>) |
| Ответы |
Re: psql > split > queries & output
|
| Список | pgsql-general |
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:
$ 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,
--
Daniel Vérité
PostgreSQL-powered mailer: https://www.manitou-mail.org
Twitter: @DanielVerite
В списке pgsql-general по дате отправления: