how to echo SQL commands in the output of a script

Поиск
Список
Период
Сортировка
От Gino Lucrezi
Тема how to echo SQL commands in the output of a script
Дата
Msg-id 77l5s0p77epa9c4uc0516jdc16dmto79ua@4ax.com
обсуждение исходный текст
Список pgsql-novice
I have a number of sql scripts which I execute using psql -f

I can easily redirect the output for logging and archival.
However, psql will only display the result of each SQL statement, and
not the actual SQL statement.
While this is fine for most purposes, sometimes I'd rather have both
the SQL statement and its output on the same file.

Is there a way to have it?

In case I wasn't clear... did you ever do any batch programming under
MS-DOS? I need the equivalent of the ECHO ON command

Thanks in advance

Gino

Gino Lucrezi
Penta Consulting Services Srl

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

Предыдущее
От: Andreas Kretschmer
Дата:
Сообщение: Re: how to echo SQL commands in the output of a script
Следующее
От: Andrew Lazarus
Дата:
Сообщение: Re: [PERFORM] Query Optimization