Re: Strict Set Returning Functions

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Strict Set Returning Functions
Date: 2011-06-15 23:33:55
Message-ID: BANLkTi=4ZJSHH4qA5-u3f7dHpCx_cCt2iA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 16, 2011 at 12:24 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
>> On Wed, Jun 15, 2011 at 8:05 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> Simon Riggs <simon(at)2ndQuadrant(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2011-06-16 00:08:09 Re: creating CHECK constraints as NOT VALID
Previous Message Tom Lane 2011-06-15 23:32:29 Re: creating CHECK constraints as NOT VALID