Re: *****SPAM***** Re: if-clause to an exiting statement

From: Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
To: kobi(dot)biton <kobi(at)comns(dot)co(dot)il>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: *****SPAM***** Re: if-clause to an exiting statement
Date: 2010-12-07 16:51:09
Message-ID: 174FCAE5-82B6-44A0-8826-939CA0747BD6@elevated-dev.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Dec 7, 2010, at 4:58 AM, kobi.biton wrote:
>
> hi thanks for the reply I did look at the CASE statement however cannot seem
> to alter the returned row-count ...

Well, yeah. The row count is the count of rows returned. If there are no rows matched by the query, then what exactly do you expect to happen? Set the row count to 1, so that the application then tries to access the 1st row of 0???

If you need some dummy row returned even in the case where there's no match, then you'll have to construct your query that way...

--
Scott Ribe
scott_ribe(at)elevated-dev(dot)com
http://www.elevated-dev.com/
(303) 722-0567 voice

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kobi Biton 2010-12-07 16:58:46 Re: *****SPAM***** Re: if-clause to an exiting statement
Previous Message Tom Lane 2010-12-07 16:43:39 Re: dotted quad netmask conversion