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

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: raise notice, psql and having some feedback from scripts
Дата
Msg-id 20081103142041.GM2459@frubble.xen.chris-lamb.co.uk
обсуждение исходный текст
Ответ на raise notice, psql and having some feedback from scripts  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
Список 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 по дате отправления:

Предыдущее
От: Russ Brown
Дата:
Сообщение: Re: Performance of views
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Are there plans to add data compression feature to postgresql?