| From: | Peter Eisentraut <peter_e(at)gmx(dot)net> | 
|---|---|
| To: | Joe Conway <mail(at)joeconway(dot)com> | 
| Cc: | "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Subject: | Re: array support patch phase 1 patch | 
| Date: | 2003-04-08 12:19:56 | 
| Message-ID: | Pine.LNX.4.44.0304071922240.1944-100000@peter.localdomain | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | 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(at)gmx(dot)net
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Hannu Krosing | 2003-04-08 13:55:44 | Re: array support patch phase 1 patch | 
| Previous Message | Tom Lane | 2003-04-07 03:45:15 | Re: array support patch phase 1 patch |