Re: multiset patch review - Mailing list pgsql-hackers

From Robert Haas
Subject Re: multiset patch review
Date
Msg-id AANLkTi=_QjKU7L5AXLFVBZXS3H0Fqhtee4S+GJA4V6--@mail.gmail.com
Whole thread Raw
In response to Re: multiset patch review  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
Responses Re: multiset patch review  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: multiset patch review  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
On Mon, Jan 24, 2011 at 7:27 AM, Itagaki Takahiro
<itagaki.takahiro@gmail.com> wrote:
> On Mon, Jan 24, 2011 at 20:49, Robert Haas <robertmhaas@gmail.com> wrote:
>> I notice that this is adding keywords and syntax support for what is
>> basically a PostgreSQL extension (since we certainly can't possibly be
>> following the SQL standards given that we're not implementing a new
>> datatype.  Is that really a good idea?
>
> As I wrote here,
> http://archives.postgresql.org/pgsql-hackers/2011-01/msg00829.php
> I think we can follow the SQL standard incrementally because we
> have function overloads.
>
> One exception is the result type of collect() aggregate function.
> It returns an array for now, but will return a multiset when we
> support true multiset data type.

So, the plan is to add this now with non-standard semantics and then
change the semantics later if and when we implement what the standard
requires?  That's not something we usually do, and I don't see why
it's a better idea in this case than it is in general.  It's OK to
have non-standard behavior with non-standard syntax, but I think
non-standard behavior with standard syntax is something we want to try
hard to avoid.

I'm in favor of rejecting this patch in its entirety.  The
functionality looks useful, but once you remove the syntax support, it
could just as easily be distributed as a contrib module rather than in
core.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: mingw 64 build
Next
From: Tom Lane
Date:
Subject: Re: multiset patch review