Skip site navigation (1) Skip section navigation (2)

Re: Re: regexp_matches illegally restricts rows -- just a documentation issue?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Josh Berkus <josh(at)postgresql(dot)org>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Re: regexp_matches illegally restricts rows -- just a documentation issue?
Date: 2010-04-06 16:10:00
Message-ID: q2i603c8f071004060910ta4ea434eiefb338ed6f18f519@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-bugs
On Tue, Apr 6, 2010 at 1:06 AM, Josh Berkus <josh(at)postgresql(dot)org> wrote:
> On 4/5/10 9:16 PM, Josh Berkus wrote:
>
>> I can't see how this is anything but a bug; as far as I know, nothing in
>> the target list is allowed to restrict the number of rows which are
>> returned by the query.  We should get 7 rows, 3 of which have an empty
>> array or a NULL in the 2nd column.
>
> Just noticed it's a SETOF[] function.  Which makes it odd that I can
> call it in the target list at all, but explains the row restriction.
>
> It's still confusing behavior (three regulars on IRC thought it was a
> bug too) and users should be warned in the documentation.  Not sure
> exactly where, though ... maybe in 9.7?

While I understand why this is confusing, it's really very normal
behavior for a SRF, and I don't really think it makes sense to
document that this SRF behaves just like other SRFs...

...Robert

In response to

Responses

pgsql-bugs by date

Next:From: Magnus HaganderDate: 2010-04-06 17:39:56
Subject: Re: BUG #5394: invalid declspec for PG_MODULE_MAGIC
Previous:From: Josh BerkusDate: 2010-04-06 05:06:46
Subject: Re: regexp_matches illegally restricts rows -- just a documentation issue?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group