Re: Capturing pgsql ERRORS/NOTICES to file

From: "George Weaver" <georgew1(at)mts(dot)net>
To: "Josh Berkus" <josh(at)agliodbs(dot)com>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Capturing pgsql ERRORS/NOTICES to file
Date: 2003-09-26 19:15:19
Message-ID: 005d01c38462$a734e970$560fa18e@cleartag
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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(at)agliodbs(dot)com>
To: "George Weaver" <georgew1(at)mts(dot)net>; <pgsql-sql(at)postgresql(dot)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(at)postgresql(dot)org)
>

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Wei Weng 2003-09-26 19:16:16 Re: Capturing pgsql ERRORS/NOTICES to file
Previous Message Wei Weng 2003-09-26 18:34:11 Re: tsearch2 question