Re: Providing an alternative result when there is no result

Поиск
Список
Период
Сортировка
От David Wilson
Тема Re: Providing an alternative result when there is no result
Дата
Msg-id e7f9235d0905181238l631f3793o8f69df5075f790dc@mail.gmail.com
обсуждение исходный текст
Ответ на Providing an alternative result when there is no result  (Joshua Berry <yoberi@gmail.com>)
Список pgsql-general
On Mon, May 18, 2009 at 3:13 PM, Joshua Berry <yoberi@gmail.com> wrote:
> Any hints/tips? Is our original solution okay, or is there something we can
> do to improve things?

It seems as if you don't really care about the results of the query-
just whether or not it returns any rows. In that case, why not
something like:

select (case when exists (select * from foo where...) then true else
false end) as result;
--
- David T. Wilson
david.t.wilson@gmail.com

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Providing an alternative result when there is no result
Следующее
От: Reece Hart
Дата:
Сообщение: Re: Providing an alternative result when there is no result