Re: Strict Set Returning Functions - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Strict Set Returning Functions
Date
Msg-id BANLkTi=4ZJSHH4qA5-u3f7dHpCx_cCt2iA@mail.gmail.com
Whole thread Raw
In response to Re: Strict Set Returning Functions  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Jun 16, 2011 at 12:24 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Simon Riggs <simon@2ndQuadrant.com> writes:
>> On Wed, Jun 15, 2011 at 8:05 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> Simon Riggs <simon@2ndQuadrant.com> writes:
>>>> So a function that is both STRICT and SET RETURNING will return rows.
>
>>> Really?  The case behaves as expected for me.
>
>> Seems that's the wrong question. Let me return to why I raised this:
>
>> Why does evaluate_function() specifically avoid returning NULL for a
>> set returning function?
>
> Because replacing the SRF call with a constant NULL would produce the
> wrong result, ie, a single row containing NULL, not zero rows.

OK, thanks.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: creating CHECK constraints as NOT VALID
Next
From: Alvaro Herrera
Date:
Subject: Re: creating CHECK constraints as NOT VALID