Re: C Language Stored Procedure Returning No Data

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: C Language Stored Procedure Returning No Data
Дата
Msg-id 20060203001752.GA76407@winnie.fuhr.org
обсуждение исходный текст
Ответ на C Language Stored Procedure Returning No Data  (bfraci@aol.com)
Ответы Re: C Language Stored Procedure Returning No Data  (Jeff Trout <threshar@torgo.978.org>)
Список pgsql-general
On Wed, Feb 01, 2006 at 12:56:30PM -0500, bfraci@aol.com wrote:
> From a C stored procedure, how can I tell Postgres to pass on to
> the Java client that there is No Data? A zero length byte array or
> a null value is not the same as No Data.

If you declare the function with "RETURNS bytea" then the function
must return something; if zero-length data and NULL aren't suitable
for indicating no data then you could raise an error and catch that
error in the client.  Another possibility would be to make the
function set-returning ("RETURNS SETOF bytea" and some code changes)
and return no rows to indicate no data.

--
Michael Fuhr

В списке pgsql-general по дате отправления:

Предыдущее
От: Tony Caduto
Дата:
Сообщение: Re: question about MAKE_EXPIRED_TUPLES_VISIBLE
Следующее
От: Leonard Soetedjo
Дата:
Сообщение: Re: PostgreSQL best practices?