Re: MULTISET patch
Itagaki Takahiro <itagaki.takahiro@gmail.com>
From: Itagaki Takahiro <itagaki.takahiro@gmail.com>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2010-12-27T01:36:35Z
Lists: pgsql-hackers
Attachments
- multiset-20101227.patch (application/octet-stream) patch
On Mon, Dec 27, 2010 at 02:09, Pavel Stehule <pavel.stehule@gmail.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