Received: from rakete.joerdens.de ([62.104.116.200]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1LMVnx38687 for ; Wed, 21 Feb 2001 17:31:49 -0500 (EST) (envelope-from frank@rakete.joerdens.de) Received: (from frank@localhost) by rakete.joerdens.de (8.9.3/8.9.3) id XAA25813; Wed, 21 Feb 2001 23:36:45 +0100 Date: Wed, 21 Feb 2001 23:36:45 +0100 From: Frank Joerdens To: Ken Kline Cc: pgsql-sql@postgresql.org Subject: Re: logging a psql script Message-ID: <20010221233645.A25790@rakete.joerdens.de> References: <3A943843.CA8825F8@oldbs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.1.2i In-Reply-To: <3A943843.CA8825F8@oldbs.com>; from ken@oldbs.com on Wed, Feb 21, 2001 at 04:51:00PM -0500 X-Subliminal-Message: Use Linux! Use Linux! X-Archive-Number: 200102/332 X-Sequence-Number: 1528 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