pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
complete output to file??
3+ messages / 2 participants
[nested] [flat]

* complete output to file??
@ 2001-10-03 18:49  Chris Pesko <cpesko@organic.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Chris Pesko @ 2001-10-03 18:49 UTC (permalink / raw)
  To: pgsql-admin

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?




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: complete output to file??
@ 2001-10-04 00:09  Lee Harr <missive@frontiernet.net>
  parent: Chris Pesko <cpesko@organic.com>
  1 sibling, 0 replies; 3+ messages in thread

From: missive@frontiernet.net @ 2001-10-04 00:09 UTC (permalink / raw)
  To: pgsql-admin

> 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.







^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: complete output to file??
@ 2001-10-04 18:37  Chris Pesko <cpesko@organic.com>
  parent: Chris Pesko <cpesko@organic.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Chris Pesko @ 2001-10-04 18:37 UTC (permalink / raw)
  To: missive@hotmail.com; pgsql-admin

Thank you very much.  I will try your suggestions.  I'm new to PostgreSQL 
and I'm very happy with the quick responses I'm getting from the email 
subscription.  It's a great help.  When I get better I will return the 
favors to others in need.

At 12:09 AM 10/4/01 +0000, Lee Harr wrote:
> > 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.
>
>
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2001-10-04 18:37 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-10-03 18:49 complete output to file?? Chris Pesko <cpesko@organic.com>
2001-10-04 00:09 ` Lee Harr <missive@frontiernet.net>
2001-10-04 18:37 ` Chris Pesko <cpesko@organic.com>

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