Re: xml-file as foreign table?

From: Johann Spies <johann(dot)spies(at)gmail(dot)com>
To: Arjen Nienhuis <a(dot)g(dot)nienhuis(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: xml-file as foreign table?
Date: 2016-05-09 11:58:38
Message-ID: CAGZ55DQmYButFr7XnJUEtdmas2jf3RMg=NJGamr5BRfF9p_5Sg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Robert Anderson 2016-05-09 12:04:17 Create index concurrently hanging with big table on pgsql 9.3.12
Previous Message Sterpu Victor 2016-05-09 10:51:10 Re: Slow query when the select list is big