Re: Providing an alternative result when there is no result - Mailing list pgsql-general

From Reece Hart
Subject Re: Providing an alternative result when there is no result
Date
Msg-id 1242675195.5741.32.camel@snafu
Whole thread Raw
In response to Providing an alternative result when there is no result  (Joshua Berry <yoberi@gmail.com>)
List 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 by date:

Previous
From: David Wilson
Date:
Subject: Re: Providing an alternative result when there is no result
Next
From: Tom Lane
Date:
Subject: Re: Daylight saving time question