Search Postgresql Archives

Re: array element replace ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/1/22 Gauthier, Dave <dave.gauthier@xxxxxxxxx>:
> 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’.
>
Not sure you can replace an array value with an array (which kind of is
what you're asking in your example),  but:

http://www.postgresql.org/docs/8.4/static/arrays.html
Specifically section
 8.14.4. Modifying Arrays

Cheers,
Andrej

-- 
Please don't top post, and don't use HTML e-Mail :}  Make your quotes concise.

http://www.american.edu/econ/notes/htmlmail.htm

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux