pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bertrand Petit <pgsql-sql@phoe.frmug.org>
To: PostgreSQL-sql <pgsql-sql@postgresql.org>
Subject: Re: Comparing arrays
Date: Mon, 11 Aug 2003 11:37:56 +0200
Message-ID: <20030811113756.A77484@memo.frmug.org> (raw)
In-Reply-To: <3F351AC9.6020606@joeconway.com>
References: <20030809121212.A71948@memo.frmug.org>
	<3F351AC9.6020606@joeconway.com>

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



view thread (4+ messages)

Message-ID: <20030811113756.A77484@memo.frmug.org>
Permalink:  ../20030811113756.A77484@memo.frmug.org/
Also on:    postgresql.org/message-id/20030811113756.A77484@memo.frmug.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: pgsql-sql@phoe.frmug.org
  Subject: Re: Comparing arrays
  In-Reply-To: <20030811113756.A77484@memo.frmug.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox