Re: array support patch phase 1 patch - Mailing list pgsql-patches

From Peter Eisentraut
Subject Re: array support patch phase 1 patch
Date
Msg-id Pine.LNX.4.44.0304071922240.1944-100000@peter.localdomain
Whole thread Raw
In response to Re: array support patch phase 1 patch  (Joe Conway <mail@joeconway.com>)
Responses Re: array support patch phase 1 patch  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: array support patch phase 1 patch  (Joe Conway <mail@joeconway.com>)
List pgsql-patches
Joe Conway writes:

>     select ARRAY[1,2,3];
>     select ARRAY[[1,2,3],[4,5,6]];
>     select ARRAY[ARRAY[1,2,3],ARRAY[4,5,6]];
>     ...etc up to 6 dimensions

Why only 6?

> 4. Duplicated contrib/array functionality (and then some) in the
>     backend using polymorphic functions and operators.

>     SELECT ARRAY[1,2,3] *= 2 AS "TRUE";
>     SELECT ARRAY[1,2,3] *<> 4 AS "TRUE";

Couldn't this kind of operation be handled more cleanly (at least
semantically speaking), if we provide a function that converts an array to
a set and then use standard set searching operations?  For example,

SELECT 2 IN TABLE(ARRAY[1,2,3]);

> 5. Side note: I added ANYARRAY1 and ANYELEMENT1 in this version.

Doing what?

--
Peter Eisentraut   peter_e@gmx.net


pgsql-patches by date:

Previous
From: Andrew Sullivan
Date:
Subject: pglog-rotator
Next
From: Hannu Krosing
Date:
Subject: Re: array support patch phase 1 patch