Re: how to echo SQL commands in the output of a script

От: George Weaver
Тема: Re: how to echo SQL commands in the output of a script
Дата: ,
Msg-id: 004001c4e4f6$c962ce40$6400a8c0@Dell4500
(см: обсуждение, исходный текст)
Ответ на: how to echo SQL commands in the output of a script  (Gino Lucrezi)
Список: pgsql-novice

Does the psql option -e not provide what you're looking for?

George

----- Original Message -----
From: "Gino Lucrezi" <>
To: <>
Sent: Friday, December 17, 2004 6:48 AM
Subject: [NOVICE] how to echo SQL commands in the output of a script


>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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>



В списке pgsql-novice по дате сообщения:

От: George Weaver
Дата:
Сообщение: Re: how to echo SQL commands in the output of a script
От: Tom Lane
Дата:
Сообщение: Re: Copying pg_control file