Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f940YWn50950 for ; Wed, 3 Oct 2001 20:34:32 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id f9409gc44272 for pgsql-admin@postgresql.org; Wed, 3 Oct 2001 20:09:42 -0400 (EDT) (envelope-from news) From: missive@frontiernet.net (Lee Harr) X-Newsgroups: comp.databases.postgresql.admin Subject: Re: complete output to file?? Date: Thu, 4 Oct 2001 00:09:42 +0000 (UTC) Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 26 Message-ID: <9pg9c5$1b7d$1@news.tht.net> References: <4.3.2.7.2.20011003114642.01dae980@mailhost.organic.com> Reply-To: missive@hotmail.com X-Complaints-To: scrappy@hub.org User-Agent: slrn/0.9.7.0 (FreeBSD) To: pgsql-admin@postgresql.org X-Archive-Number: 200110/44 X-Sequence-Number: 2290 > 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.