Re: raise notice, psql and having some feedback from scripts - Mailing list pgsql-general

From Sam Mason
Subject Re: raise notice, psql and having some feedback from scripts
Date
Msg-id 20081103142041.GM2459@frubble.xen.chris-lamb.co.uk
Whole thread Raw
In response to raise notice, psql and having some feedback from scripts  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
List pgsql-general
On Mon, Nov 03, 2008 at 03:14:14PM +0100, Ivan Sergio Borgonovo wrote:
> I just have some batch work in scripts that I pass through:
>
> psql < script.sql &>script.log &
>
> or may be run by cron.
>
> In sql raise notice is not available. Is there any other way to send
> messages to the logs without polluting them too much with -a?

You could write a pl/pgsql function that just does a RAISE NOTICE with
its argument.  As another aid, the output from psql tends to be better
if you use "-f script.sql" rather than piping the file in.


  Sam

pgsql-general by date:

Previous
From: Russ Brown
Date:
Subject: Re: Performance of views
Next
From: Craig Ringer
Date:
Subject: Re: Are there plans to add data compression feature to postgresql?