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

From: Andreas Kretschmer <andreas_kretschmer(at)despammed(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: how to echo SQL commands in the output of a script
Date: 2004-12-17 19:30:55
Message-ID: foob92-if7.ln1@kaufbach.delug.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

begin Gino Lucrezi <gino-pgadmin(at)lucrezi(dot)net> wrote:
> 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?

I think, you search the '-e' - Option for psql.

> 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

What for the hell is MS-DOS?

> Thanks in advance

Please ;-)

end
Andreas
--
Diese Message wurde erstellt mit freundlicher Unterstützung eines freilau-
fenden Pinguins aus artgerechter Freilandhaltung. Er ist garantiert frei
von Micro$oft'schen Viren. (#97922 http://counter.li.org) GPG 7F4584DA
Was, Sie wissen nicht, wo Kaufbach ist? Hier: N 51.05082°, E 13.56889° ;-)

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Fuhr 2004-12-18 08:08:35 Re: Postgresql
Previous Message Robert Boone 2004-12-17 18:02:37 Re: Problem with pl/perl in postgresql 8.0rc1