X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3226DD7F02 for ; Fri, 23 Sep 2005 23:51:55 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 76721-01 for ; Sat, 24 Sep 2005 02:51:47 +0000 (GMT) Received: from web35205.mail.mud.yahoo.com (web35205.mail.mud.yahoo.com [66.163.179.84]) by svr1.postgresql.org (Postfix) with SMTP id 7C7A4D6E40 for ; Fri, 23 Sep 2005 23:51:48 -0300 (ADT) Received: (qmail 62890 invoked by uid 60001); 24 Sep 2005 02:51:53 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=LH5rvJU7QOfH/5s/cXflzv6IM5pSFaGx7vGAEOiN1BhTGIgyX7QKmhSUIuE+amA2CBA7N+pZVsZ/wwIYLKwqnEJFxzpe/1aQLkvhic3K2tdBKz0NJYNc/8/pg5lPDDjKeNB8g5TjbT7xWt7b6g0UEcx8WbILX4xxy6CRaHEMeXw= ; Message-ID: <20050924025153.62888.qmail@web35205.mail.mud.yahoo.com> Received: from [70.104.144.58] by web35205.mail.mud.yahoo.com via HTTP; Fri, 23 Sep 2005 19:51:53 PDT Date: Fri, 23 Sep 2005 19:51:53 -0700 (PDT) From: Matthew Peter Subject: Re: delete item[5] from varchar[] array??? To: Michael Fuhr Cc: pgsql-sql@postgresql.org In-Reply-To: <20050923191057.GA81954@winnie.fuhr.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.27 required=5 tests=[AWL=-0.104, DNS_FROM_RFC_ABUSE=0.374] X-Spam-Level: X-Archive-Number: 200509/239 X-Sequence-Number: 22786 --- Michael Fuhr wrote: > On Fri, Sep 23, 2005 at 10:02:44AM -0700, Matthew > Peter wrote: > > --- Michael Fuhr wrote: > > > test=> UPDATE foo SET a = a[1:3] || a[5:6]; > > > > I sure hope there is a better way :) There must be > an > > easy, native way to interface with arrays. > > Hoping a thing is true doesn't mean it must be true > :-) > > > We all know programming languages have ways to > delete items in an > > array natively, it just needs to be exposed. > > No, we don't all know that because it isn't > generally true, or else > you're using a loose definition of "natively." > Languages differ > in what capabilities they offer "natively." > > contrib/intarray implements an intarray_del_elem() > function, > presumably because the core product doesn't offer > that capability, > or at least didn't when the module was written. If > you think it's > there just waiting to be exposed, then dig into the > source code and > expose it :-) > > -- > Michael Fuhr > Yes. I should've said "most" and some thanks to libs. I'm busy in other source which is why I hoped those who were already engulfed in pg's source would have a solution... Thought this functionality may be around... somewhere.... which is why I asked. Took a brief look at intarray_del_elem() function you mentioned. This may be perfect, and then some. I'll play around with it. Thanks __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com