Re: how to get UPDATEXML function in postgresql as it works in oracle - Mailing list pgsql-general

From Raghavendra
Subject Re: how to get UPDATEXML function in postgresql as it works in oracle
Date
Msg-id CA+h6AhjGgcdNX2VDNKq0CbfJMYe5nbcj+ef94W5_7i8L3UA_Qw@mail.gmail.com
Whole thread Raw
In response to how to get UPDATEXML function in postgresql as it works in oracle  (saritha N <saritha.0917@gmail.com>)
List pgsql-general
On Tue, Jul 30, 2013 at 9:51 AM, saritha N <saritha.0917@gmail.com> wrote:
Thanks for your reply Raghavendra,

 
Thanks for the update. 
Request to mark postgresql group email while replying so it will help much if other's have better idea as well if any correction in my test case. 

 
Whatever you have sent its very useful for me.I need to add one more node between the values,like
<values>Infosys<place>Bangalore</place></values>
How to add?


postgres=# update xdata set xmlcode='<values>Infosys<place>Bangalore</place></values>' where cast(xpath('//values/text()',xmlcode) as text[]) = '{Infosys}';
UPDATE 1

postgres=# select xmlparse(content xmlcode) from xdata ;
                     xmlparse
--------------------------------------------------
 <values>Enterprisedb</values>
 <values>Wipro</values>
 <values>Infosys<place>Bangalore</place></values>
(3 rows)

pgsql-general by date:

Previous
From: Luca Ferrari
Date:
Subject: Re: to know what columns are getting updated
Next
From: raghu ram
Date:
Subject: Re: Fwd: corrupted files