Re: Odd array issue - Mailing list pgsql-general

From Tom Lane
Subject Re: Odd array issue
Date
Msg-id 1399.1232549178@sss.pgh.pa.us
Whole thread Raw
In response to Odd array issue  (Craig Ringer <craig@postnewspapers.com.au>)
Responses Re: Odd array issue
List pgsql-general
Craig Ringer <craig@postnewspapers.com.au> writes:
> The following query should return 2 records, but returns zero instead:

> test=> select x, regexp_matches(x::text, 'm')
> test-> FROM generate_series(1,2) AS x;
>  x | regexp_matches
> ---+----------------
> (0 rows)

No, that's correct.  The SRF returns an empty set, so there are no
output records.  The behavior you seem to be imagining would make it
impossible to distinguish empty set from a single row containing NULL.

            regards, tom lane

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Odd array issue
Next
From: Abdul Rahman
Date:
Subject: autovacuum daemon