[BUGS] plpgsql bug: `EXECUTE(sql_command) INTO rec` returns sometimes aNULL-able, sometimes not - Mailing list pgsql-bugs

From Manuel Pradal
Subject [BUGS] plpgsql bug: `EXECUTE(sql_command) INTO rec` returns sometimes aNULL-able, sometimes not
Date
Msg-id CABsmV8g3ENCq+YD35vVwr667CSCkAu2oudJgHBDfA67zm8_P9g@mail.gmail.com
Whole thread Raw
Responses Re: [BUGS] plpgsql bug: `EXECUTE(sql_command) INTO rec` returnssometimes a NULL-able, sometimes not  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: [BUGS] plpgsql bug: `EXECUTE(sql_command) INTO rec` returnssometimes a NULL-able, sometimes not  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-bugs
Hi,

Using PL/SQL language, I saw a strange behavior using "EXECUTE(sql_command) INTO", then "IF rec IS NOT NULL THEN" statement.
It seems that record content infers with existence test of whole record.

You can see in attached file the possible bug in action.

Should I use "IF NOT FOUND" syntax? Is it more reliable?

Thank you in advance!

Manuel PRADAL
Attachment

pgsql-bugs by date:

Previous
From: Dave Page
Date:
Subject: Re: [BUGS] BUG #14630: Pgadmin window looks like simple html, no graphics
Next
From: Pavel Stehule
Date:
Subject: Re: [BUGS] plpgsql bug: `EXECUTE(sql_command) INTO rec` returnssometimes a NULL-able, sometimes not