RE: Capturing all output from psql into a file - Mailing list pgsql-novice

From Tamsin
Subject RE: Capturing all output from psql into a file
Date
Msg-id NEBBKHBOBMJCHDMGKCNJKEJICHAA.tamsin@bryncadfan.co.uk
Whole thread Raw
In response to Capturing all output from psql into a file  ("Huy Do" <huy@travel.com.au>)
Responses Re: Capturing all output from psql into a file
List pgsql-novice
I use this:

psql dbname -c "\i sqlscript.txt" &> file.txt

(enter at shell prompt rather than going into psql first)

Hope this helps,
Tamsin


> -----Original Message-----
> From: pgsql-novice-owner@postgresql.org
> [mailto:pgsql-novice-owner@postgresql.org]On Behalf Of Huy Do
> Sent: 20 December 2000 05:37
> To: pgsql-novice@postgresql.org
> Subject: [NOVICE] Capturing all output from psql into a file
>
>
> Hi,
>
> I am doing this mass table creation (approx 600 tables) and then
> mass dump of records into these tables (~900megs of flat files).
>
> All the table creation and record copy is being done from a file
> using \i sqlscript.txt.
>
> How can I capture all the output which comes out from psql. I need
> all the errors and not just the query result.
>
> I have tried to use \o file.txt and \g file.txt but they only
> seem to output the query result.
>
> Many thanks.
>
> Huy
>

pgsql-novice by date:

Previous
From: "Huy Do"
Date:
Subject: Capturing all output from psql into a file
Next
From: Fred Accary
Date:
Subject: plpgsql not unrecognized