Re: targetted array element modification or delete without knowing the index?

From: Richard Broersma <richard(dot)broersma(at)gmail(dot)com>
To: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: targetted array element modification or delete without knowing the index?
Date: 2009-12-24 18:11:04
Message-ID: 396486430912241011t7c70ffcj33175cdd99c63ebe@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Dec 24, 2009 at 10:01 AM, Gauthier, Dave
<dave(dot)gauthier(at)intel(dot)com> wrote:
> Is there a way to modify or delete an element of an array with knowledge
> only of the element’s value?  Maybe an array index finder would help?

I haven't tried it myself, but would the array "contains" operator work for you?

http://www.postgresql.org/docs/8.4/static/functions-array.html#ARRAY-OPERATORS-TABLE

--
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mark Morgan Lloyd 2009-12-24 19:20:35 Updating from 8.2 to 8.4
Previous Message Gauthier, Dave 2009-12-24 18:01:45 targetted array element modification or delete without knowing the index?