From: | Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Odd array issue |
Date: | 2009-01-21 16:02:45 |
Message-ID: | 49774725.1060105@postnewspapers.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tom Lane wrote:
> Craig Ringer <craig(at)postnewspapers(dot)com(dot)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.
Aah, that makes sense. For some reason I'd been thinking of
regexp_matches as returning a single array, rather than returning a set
of scalar values. RTFM (better) I guess. Sorry.
Thanks for taking a look, it's appreciated.
--
Craig Ringer
From | Date | Subject | |
---|---|---|---|
Next Message | Grzegorz Jaśkiewicz | 2009-01-21 16:20:00 | Re: Slow update |
Previous Message | Merlin Moncure | 2009-01-21 15:32:02 | Re: [GENERAL] bytea size limit? |