Re: MULTISET patch

From: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: MULTISET patch
Date: 2010-12-27 01:36:35
Message-ID: AANLkTikJ-j7OZh51KqY-O-xt2v8T6sbPP-P6qHZrC=fS@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 27, 2010 at 02:09, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> I have a free time and I can do a review of your patch. Please, can
> send a last version and can send a links on documentation that you
> used?

Thanks! The latest patch attached.
I've not written documentation yet, but I used the following site:

[The SQL standard]
- http://www.wiscorp.com/sql20nn.zip
- http://www.wiscorp.com/sqlmultisets.zip
[secondary information]
- http://farrago.sourceforge.net/design/CollectionTypes.html
- http://waelchatila.com/2005/05/18/1116485743467.html
[Implementation in Oracle Database]
- http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/conditions006.htm
- http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/operators006.htm

Here are the list of functions in the patch. Note that all of the
functions treat arrays as one-dimensional (ex. [N][M] => [N * M])
because there is no multi-dimensional arrays/multiset support
in the SQL standard.

- [FUNCTION] cardinality(anyarray) => integer
- [FUNCTION] trim_array(anyarray, nTrimmed integer) => anyarray
- [FUNCTION] array_flatten(anyarray) => anyarray
- [FUNCTION] array_sort(anyarray) => anyarray
- [FUNCTION] set(anyarray) => anyarray
- [SYNTAX] $1 IS [NOT] A SET => boolean
- [SYNTAX] $1 [NOT] MEMBER OF $2 => boolean
- [SYNTAX] $1 [NOT] SUBMULTISET OF $2 => boolean
- [SYNTAX] $1 MULTISET UNION [ALL | DISTINCT] $2 => anyarray
- [SYNTAX] $1 MULTISET INTERSECT [ALL | DISTINCT] $22 => anyarray
- [SYNTAX] $1 MULTISET EXCEPT [ALL | DISTINCT] $22 => anyarray
- [AGGREGATE] collect(anyelement) => anyarray
- [AGGREGATE] fusion(anyarray) => anyarray
- [AGGREGATE] intersection(anyarray) => anyarray

--
Itagaki Takahiro

Attachment Content-Type Size
multiset-20101227.patch application/octet-stream 46.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-12-27 02:38:00 Re: Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.
Previous Message Tom Lane 2010-12-27 01:13:40 Re: knngist - 0.8