Re: MULTISET and additional functions for ARRAY

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: MULTISET and additional functions for ARRAY
Date: 2010-11-11 17:20:18
Message-ID: 7DD67FAA-05DE-4279-8285-741A960E50D1@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-11-11 17:29:11 Re: wCTE behaviour
Previous Message Mark Cave-Ayland 2010-11-11 17:19:35 Re: improved parallel make support