Re: Comparing arrays

From: Bertrand Petit <pgsql-sql(at)phoe(dot)frmug(dot)org>
To: PostgreSQL-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Comparing arrays
Date: 2003-08-11 09:37:56
Message-ID: 20030811113756.A77484@memo.frmug.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Sat, Aug 09, 2003 at 09:01:13AM -0700, Joe Conway wrote:
>
> This should work on 7.4 beta.

And now it works too in 7.3. I've implemented the <, <=, =,
<>, =>, and > operators in PL/pgSQL for the VARCHAR[] type and
assembled them into an operator class. This is just a bit slow but
that's bearable considering that the queries using them are just
exceptional administrativia tasks.

> In any case, 7.3 and before have many issues with effective use of
> arrays. For instance, even if you got all this working, you'd find
> working with arrays in PL/pgSQL painful if not impossible.

The only annoyance trouble I had with array manipulation is
the array_dims() function. I had to wrap it inside

split_part(split_part(array_dims($1), ']', 1), ':', 2)::INT

> If you really depend on arrays, I'd strongly suggest testing on 7.4 beta
> and moving to 7.4 as soon as it is released.

Right now I'll try to stay away from betas or .1 releases: I'm
not yet confident enough with my skills and may not be able to decide
if a failure is mine or postgresql's.

Thanks for your kind answer.

--
%!PS
297.6 420.9 translate 90 rotate 0 setgray gsave 0 1 1{pop 0 180 moveto 100
180 170 100 170 -10 curveto 180 -9 180 -9 190 -10 curveto 190 100 100 180
0 180 curveto fill 180 rotate}for grestore/Bookman-LightItalic findfont
240 scalefont setfont -151.536392 -63.7998886 moveto (bp)show showpage

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Silke Trissl 2003-08-11 10:21:07 INSERT INTO ... SELECT
Previous Message BenLaKnet 2003-08-11 07:23:04 Re: [pg-sql] - Problem with duplicate table (PostgreSQL 7.2.3