array element replace ?

From: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: array element replace ?
Date: 2010-01-21 23:45:50
Message-ID: 482E80323A35A54498B8B70FF2B87980043ADEF015@azsmsx504.amr.corp.intel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is there a clever way to replace a single element in an array with another value?

E.g.

x = array['a','b','c','d'];

I want to replace 'b' with 'x'.

Thanks for any suggestions!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrej 2010-01-21 23:53:30 Re: array element replace ?
Previous Message Tom Lane 2010-01-21 23:16:00 Re: Old/New