Обсуждение: Raise Notice question

Поиск
Список
Период
Сортировка

Raise Notice question

От
Tony Caduto
Дата:
Does anyone know how  Raise Notice Messages get sent back to the client
when a function is executed?

Thanks,

Tony




Re: Raise Notice question

От
Terry Lee Tucker
Дата:
From the 7.4.6 Documentation:
[Begin Quote]
27.9. Notice Processing


Notice and warning messages generated by the server are not returned by the
query execution functions, since they do not imply failure of the query.
Instead they are passed to a notice handling function, and execution
continues normally after the handler returns. The default notice handling
function prints the message on stderr, but the application can override this
behavior by supplying its own handling function.


For historical reasons, there are two levels of notice handling, called the
notice receiver and notice processor. The default behavior is for the notice
receiver to format the notice and pass a string to the notice processor for
printing. However, an application that chooses to provide its own notice
receiver will typically ignore the notice processor layer and just do all the
work in the notice receiver.
[End Quote]

There is more in the documentation that tells you how to write your notice
receiver function.

On Thursday 28 July 2005 11:48 am, Tony Caduto saith:
> Does anyone know how  Raise Notice Messages get sent back to the client
> when a function is executed?
>
> Thanks,
>
> Tony
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
>                http://archives.postgresql.org