Re: Transform mapped XPath expressions into XML containing relational data

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Thangalin <thangalin(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Transform mapped XPath expressions into XML containing relational data
Date: 2012-11-27 04:33:46
Message-ID: 1353990826.4992.14.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2012-11-26 at 09:26 -0800, Thangalin wrote:
> Is it possible to build an XML (or JSON) document using a map database
> columns to XPath expressions? For example:
>
> root > people
> person > person
> person.first_name -> name/first
> person.last_name -> name/last
> person.age -> [(at)age]
> account.person_id => person.person_id
> account > person/account
> account.number -> [(at)id]

I would go about this by using table_to_xml or query_to_xml and then
converting the resulting XML document to your particular format using
XSLT.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2012-11-27 04:37:05 Re: Re: Problem Observed in behavior of Create Index Concurrently and Hot Update
Previous Message Peter Eisentraut 2012-11-27 04:32:15 Re: [WIP] pg_ping utility