Re: plpgsql FOUND Variable - Mailing list pgsql-general

From Alex
Subject Re: plpgsql FOUND Variable
Date
Msg-id 3F4D7220.8030606@meerkatsoft.com
Whole thread Raw
In response to Re: plpgsql FOUND Variable  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: plpgsql FOUND Variable
List pgsql-general
Tom,
I am using 7.3.4

The problem

_tmpRec = RECORD;
_name   = VARCHAR;

SELECT INTO _tmpRec * FROM address WHERE name = _name AND status = ''1''
AND last_name NOTNULL
IF FOUND THEN
  RETURN ''found'';
ELSE ....

Above Query does not produce any results. Executed in psql  result = 0
rows. However I do get the return string "found" back.

Alex

Tom Lane wrote:

>Alex <alex@meerkatsoft.com> writes:
>
>
>>when I run a SELECT INTO and the result is 0 or zero row, then I still
>>get a positive result if
>>using IF FOUND THEN....
>>
>>
>
>I recall Neil Conway fixed some problems with FOUND a version or two
>back.  If you are not on 7.3.*, update.  If you are, let's see the
>details.
>
>            regards, tom lane
>
>
>
>



pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: SQL Command - To List Tables ?
Next
From: Tom Lane
Date:
Subject: Re: plpgsql FOUND Variable