Re: Providing an alternative result when there is no result

Поиск
Список
Период
Сортировка
От Reece Hart
Тема Re: Providing an alternative result when there is no result
Дата
Msg-id 1242675195.5741.32.camel@snafu
обсуждение исходный текст
Ответ на Providing an alternative result when there is no result  (Joshua Berry <yoberi@gmail.com>)
Список pgsql-general
On Mon, 2009-05-18 at 15:13 -0400, Joshua Berry wrote:
Is there an easy and efficient way to return a boolean false for a query that returns no result, and true for one that does return a result?

Presuming that you're not using the values in temp_table, I think you should be using PERFORM * WHERE ...; and then IF FOUND ... ELSE ... END IF;

See here:
http://www.postgresql.org/docs/8.3/static/plpgsql-statements.html
and also follow link to 38.5.5 .

-Reece

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

Предыдущее
От: David Wilson
Дата:
Сообщение: Re: Providing an alternative result when there is no result
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Daylight saving time question