Re: MULTISET and additional functions for ARRAY - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: MULTISET and additional functions for ARRAY
Date
Msg-id 7DD67FAA-05DE-4279-8285-741A960E50D1@kineticode.com
Whole thread Raw
In response to MULTISET and additional functions for ARRAY  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
Responses Re: MULTISET and additional functions for ARRAY
List pgsql-hackers
On Nov 11, 2010, at 7:02 AM, Itagaki Takahiro wrote:

> MULTISET supports are more difficult. We have corresponding
> type IDs for each array, but we might not want to add additional
> IDs for multiset for each type. Any ideas for the issue?

Why not?

> If we reuse type IDs of arrays for multisets, the multisets would
> have some special typmod. For example, typmod = 0 means multiset,
> and positive value means array with max cardinality. Note that
> the SQL standard doesn't mention about multi-dimensional arrays.
> So, we can use typmod = -1 as a free-size and free-dimensional
> array for backward compatibility.
>
> If we have troublesome issues to support multiset data types,
> I'm thinking to add multiset functions that receives ARRAY
> types instead at time first time, because an ARRAY is a
> MULTISET by definition.

An array is a superset of MULTISET, I guess?

> Some of functions for multisets seems to be useful for arrays, too.
>
> Comments and suggestions welcome.

So are you planning to implement multisets? It's a feature I'd love to see…

Best,

David



pgsql-hackers by date:

Previous
From: Mark Cave-Ayland
Date:
Subject: Re: improved parallel make support
Next
From: Tom Lane
Date:
Subject: Re: wCTE behaviour