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

From Tom Lane
Subject Re: Strict Set Returning Functions
Date
Msg-id 9795.1308180259@sss.pgh.pa.us
Whole thread Raw
In response to Re: Strict Set Returning Functions  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Strict Set Returning Functions
List pgsql-hackers
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.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: On-the-fly index tuple deletion vs. hot_standby
Next
From: Tom Lane
Date:
Subject: Re: gcc 4.6 -Wunused-but-set-variable