From: George Weaver <georgew1@mts.net>
To: Josh Berkus <josh@agliodbs.com>
To: pgsql-sql@postgresql.org
Subject: Re: Capturing pgsql ERRORS/NOTICES to file
Date: Fri, 26 Sep 2003 14:15:19 -0500
Message-ID: <005d01c38462$a734e970$560fa18e@cleartag> (raw)
References: <001f01c38458$7865c5b0$560fa18e@cleartag>
<200309261133.57357.josh@agliodbs.com>
Hi Josh,
Thanks for the reply.
What I am trying to achieve is to have errors go to a file, rather than show
up on the screen.
Is this possible?
George
----- Original Message -----
From: "Josh Berkus" <josh@agliodbs.com>
To: "George Weaver" <georgew1@mts.net>; <pgsql-sql@postgresql.org>
Sent: Friday, September 26, 2003 1:33 PM
Subject: Re: [SQL] Capturing pgsql ERRORS/NOTICES to file
> George,
>
> > I am in the process of creating a batch file that will update some
> > functions in a database for a remote user similar to:
> >
> > psql -o output dbname < functionupdate.sql
> >
> > Is there any way to save any ERROR and NOTICE messages to a file?
> >
> > The -o option doesn't capture this information.
>
> You have to use command shell redirects.
>
> For example, I commonly do in bash
> psql -o output dbname < functionupdate.sql >out.dump
> ... which sends all the command responses to a file, allowing me to read
only
> the errors on the screen.
>
> See a guide to your shell for more creative redirection.
>
> --
> Josh Berkus
> Aglio Database Solutions
> San Francisco
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: georgew1@mts.net, josh@agliodbs.com
Subject: Re: Capturing pgsql ERRORS/NOTICES to file
In-Reply-To: <005d01c38462$a734e970$560fa18e@cleartag>
* 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