Re: xml-file as foreign table? - Mailing list pgsql-general

From Johann Spies
Subject Re: xml-file as foreign table?
Date
Msg-id CAGZ55DQmYButFr7XnJUEtdmas2jf3RMg=NJGamr5BRfF9p_5Sg@mail.gmail.com
Whole thread Raw
In response to Re: xml-file as foreign table?  (Arjen Nienhuis <a.g.nienhuis@gmail.com>)
List pgsql-general
Thanks Arjen,



def q(v):
     return b'"' + v.replace(b'"', b'""') + b'"'

return b','.join(q(f) for f in fields) + b'\n'

In the end I also had some other problems with the XML (namespaces), so I used:

etree.tostring(element, method='c14n', exclusive=True)

This helped. My code is now doing it's job.

Regards
Johann

pgsql-general by date:

Previous
From: "Sterpu Victor"
Date:
Subject: Re: Slow query when the select list is big
Next
From: Robert Anderson
Date:
Subject: Create index concurrently hanging with big table on pgsql 9.3.12