pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: missive@frontiernet.net
To: pgsql-admin@postgresql.org
Subject: Re: complete output to file??
Date: Thu, 4 Oct 2001 00:09:42 +0000 (UTC)
Message-ID: <9pg9c5$1b7d$1@news.tht.net> (raw)
References: <4.3.2.7.2.20011003114642.01dae980@mailhost.organic.com>

> I use \o [file] to get output to a file but it only records the 
> command.  For example:
> 
> \o vac.out
> vacuum verbose analyze;
> 
> I end up with one row "VACUUM" in vac.out.  I want the entire output that I 
> see on the screen to go to a file.  How is this done?
> 


I am not sure how to do this entirely within psql, but you can always
use the vacuumdb command or the -c flag to psql...


vacuumdb --verbose --analyze -d databasename >& output.txt
psql -c 'vacuum verbose analyze' databasename >& output.txt


Note that you must redirect both stdout and stderr to your file
in order to see everything. That seems to be why \o is not catching
the output that you want.







view thread (3+ messages)  latest in thread

Message-ID: <9pg9c5$1b7d$1@news.tht.net>
Permalink:  ../9pg9c5$1b7d$1@news.tht.net/
Also on:    postgresql.org/message-id/9pg9c5$1b7d$1@news.tht.net

 · 

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-admin@postgresql.org
  Cc: missive@frontiernet.net
  Subject: Re: complete output to file??
  In-Reply-To: <9pg9c5$1b7d$1@news.tht.net>
  References: <4.3.2.7.2.20011003114642.01dae980@mailhost.organic.com> <9pg9c5$1b7d$1@news.tht.net>

* 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