Re: logging a psql script

From: Frank Joerdens <frank(at)joerdens(dot)de>
To: Ken Kline <ken(at)oldbs(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: logging a psql script
Date: 2001-02-21 22:36:45
Message-ID: 20010221233645.A25790@rakete.joerdens.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wed, Feb 21, 2001 at 04:51:00PM -0500, Ken Kline wrote:
> Hello,
> I would like my psql script to log everything that it does.
> I set the following
>
> \set ECHO all
> \o foo.txt
> \qecho
>
> some sql, some ddl, etc...
>
> \o
>
>
> But foo.txt only contains
>
> DROP
> DROP
> DROP
> CREATE
> CREATE
> CREATE
>
> I want it to contain everything that I see on the screen, what am I
> missing?

Dunno how you do it via \o; what I do is run the postmaster with the
-d 2 option and then log everything to syslogd. This will log every query
in detail. It's very convenient while you're developing and testing,
especially if you run a separate window with

tail -f /wherever/you/write/your/postgres.log

Regards, Frank

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Oliver Elphick 2001-02-22 06:58:21 Re: logging a psql script
Previous Message Jeff Duffy 2001-02-21 22:06:21 Re: logging a psql script