Обсуждение: Returning Errors from User Defined C-functions

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

Returning Errors from User Defined C-functions

От
o.blomqvist@secomintl.com (Otto Blomqvist)
Дата:
Hello !

I have several functions that are compiled as .so and runs pretty well
under PSQL. However I would like to be able to return errors (for
debugging) using something like this

fprintf(stderr, "BEGIN command failed\n");

Problem is I don't know where this would show up..? In some Postgres
log maybe ? I am not directly calling these functions, they are called
from a Daemon, also written in C running on the same box.

Any ideas ?

Thanks a lot

/Otto Blomqvist

Re: Returning Errors from User Defined C-functions

От
Joe Conway
Дата:
Otto Blomqvist wrote:
> I have several functions that are compiled as .so and runs pretty well
> under PSQL. However I would like to be able to return errors (for
> debugging) using something like this

See:
http://www.postgresql.org/docs/current/static/error-message-reporting.html

Joe