From: Victor Sterpu <victor@caido.ro>
To: pgsql-sql@postgresql.org
Subject: Selecting data from XML
Date: Mon, 16 Jul 2012 15:56:27 -0400 (EDT)
Message-ID: <a1dc56fc-9159-4f31-9c94-9c363757f031@caido> (raw)
In-Reply-To: <0ec35c82-c931-4cb5-b9d0-d4fc49a0ef1f@caido>
If I have a XML like this
<?xml version="1.0" encoding="UTF-8"?>
<Errors>
<Error code="CLIN102" validFrom="1980-02-23"/>
<Error code="CLIN103" validFrom="1980-02-23" validTo="2012-01-01"/>
</Errors>
can I write a query that will output the columns names and values like this?
code;validFrom;validTo
------------------------------
CLIN102;1980-02-23;
CLIN103;1980-02-23;2012-01-01
Thank you
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: victor@caido.ro
Subject: Re: Selecting data from XML
In-Reply-To: <a1dc56fc-9159-4f31-9c94-9c363757f031@caido>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox