pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Frank Joerdens <frank@joerdens.de>
To: Ken Kline <ken@oldbs.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: logging a psql script
Date: Wed, 21 Feb 2001 23:36:45 +0100
Message-ID: <20010221233645.A25790@rakete.joerdens.de> (raw)
In-Reply-To: <3A943843.CA8825F8@oldbs.com>
References: <3A943843.CA8825F8@oldbs.com>

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



view thread (5+ messages)  latest in thread

Message-ID: <20010221233645.A25790@rakete.joerdens.de>
Permalink:  ../20010221233645.A25790@rakete.joerdens.de/
Also on:    postgresql.org/message-id/20010221233645.A25790@rakete.joerdens.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: frank@joerdens.de, ken@oldbs.com
  Subject: Re: logging a psql script
  In-Reply-To: <20010221233645.A25790@rakete.joerdens.de>
  References: <3A943843.CA8825F8@oldbs.com> <20010221233645.A25790@rakete.joerdens.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox