X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 4C593D1C4E3 for ; Mon, 11 Aug 2003 09:38:36 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 70059-05 for ; Mon, 11 Aug 2003 06:37:06 -0300 (ADT) Received: from frmug.org (frmug-gw.frmug.org [193.56.58.252]) by svr1.postgresql.org (Postfix) with ESMTP id AFF4AD1C4D6 for ; Mon, 11 Aug 2003 06:38:22 -0300 (ADT) Received: from frmug.org (localhost [127.0.0.1]) by frmug.org (8.12.9/8.11.3/frmug-2.7/nospam) with ESMTP id h7B9cNXd030660 (using TLSv1/SSLv3 with cipher DHE-RSA-AES256-SHA (256 bits) verified NO) for ; Mon, 11 Aug 2003 11:38:24 +0200 (CEST) (envelope-from pgsql-sql@phoe.frmug.org) Received: (from uucp@localhost) by frmug.org (8.12.9/8.12.9/Submit) with UUCP id h7B9cNRc030657 for pgsql-sql@postgresql.org; Mon, 11 Aug 2003 11:38:23 +0200 (CEST) Received: (from elrond@localhost) by memo.frmug.org (8.11.6/8.11.6) id h7B9bu777533 for pgsql-sql@postgresql.org; Mon, 11 Aug 2003 11:37:56 +0200 (CEST) (envelope-from pgsql-sql@phoe.frmug.org) X-Authentication-Warning: memo.frmug.org: elrond set sender to pgsql-sql@phoe.frmug.org using -f Date: Mon, 11 Aug 2003 11:37:56 +0200 From: Bertrand Petit To: PostgreSQL-sql Subject: Re: Comparing arrays Message-ID: <20030811113756.A77484@memo.frmug.org> Mail-Followup-To: PostgreSQL-sql References: <20030809121212.A71948@memo.frmug.org> <3F351AC9.6020606@joeconway.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <3F351AC9.6020606@joeconway.com>; from mail@joeconway.com on Sat, Aug 09, 2003 at 09:01:13AM -0700 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/93 X-Sequence-Number: 14709 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