Search Postgresql Archives

Re: raise notice, psql and having some feedback from scripts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux