From: | David Ekren <davidekren(at)yahoo(dot)com> |
---|---|
To: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | xml question |
Date: | 2014-04-28 19:15:48 |
Message-ID: | 1398712548.45749.YahooMailNeo@web161901.mail.bf1.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I am new to this forum. I need to return the value 1 between the orientationId tags in this xml string within the function below. I still get errors. I'm sure I am doing something wrong. Any help would be appreciated.
CREATE FUNCTION Davidxml9(v_clipId integer, v_orientationId varchar(1024), OUT clipId int, OUT orientationId varchar(1024)) AS $$
BEGIN
clipId := v_clipId;
orientationId := xpath('/Rows/Row/orientationId[1]/text()', content)
FROM (SELECT v_orientationId ::xml AS orientationId);
END;
$$ LANGUAGE plpgsql;
GO
SELECT Davidxml9(1,'<Rows><Row><orientationId>1</orientationId></Row></Rows>')
From | Date | Subject | |
---|---|---|---|
Next Message | John R Pierce | 2014-04-28 21:28:28 | Re: problems with permissions |
Previous Message | Stephen Frost | 2014-04-28 17:30:29 | Re: Select max(id) causes AccessExclusiveLock? |