Re: targetted array element modification or delete without knowing the index? - Mailing list pgsql-general

From Richard Broersma
Subject Re: targetted array element modification or delete without knowing the index?
Date
Msg-id 396486430912241011t7c70ffcj33175cdd99c63ebe@mail.gmail.com
Whole thread Raw
In response to targetted array element modification or delete without knowing the index?  ("Gauthier, Dave" <dave.gauthier@intel.com>)
List pgsql-general
On Thu, Dec 24, 2009 at 10:01 AM, Gauthier, Dave
<dave.gauthier@intel.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

pgsql-general by date:

Previous
From: "Gauthier, Dave"
Date:
Subject: targetted array element modification or delete without knowing the index?
Next
From: Mark Morgan Lloyd
Date:
Subject: Updating from 8.2 to 8.4