0
votes
0answers
72 views

Import xml data into postgresql table [closed]

I've got xml file with data : <teryt> <catalog name="TERC" type="all" date="2014-01-01"> <row> <col name="WOJ">02</col> <col name="POW"/> <col name="GMI"/> ...
-1
votes
1answer
74 views

Example creating a PostgreSQL XML data type

I am looking for an SQL example where a table is created in PostgreSQL which has a field with data type XML.
3
votes
1answer
471 views

How can I escape XML field in XML-output query?

I have following request: SELECT XMLAGG(data) FROM (SELECT XMLELEMENT(name item, XMLFOREST( title, body as description, date_created as date, 'http://example.com/news'||id as link )) AS ...
6
votes
3answers
7k views

SQL to read XML from file into PostgreSQL database

How can I write SQL to read an XML file into a PostgreSQL XML value? PostgreSQL has a native XML data type with the XMLPARSE function to parse a text string to that type. It also has ways to read ...