Re: XML ouput for psql

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: greg(at)turnstep(dot)com, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: XML ouput for psql
Date: 2003-03-06 23:08:17
Message-ID: Pine.LNX.4.44.0303061918170.2721-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane writes:

> This is also a good time to stop and ask whether the frontend/backend
> protocol needs to change to support this. Not having read the spec,
> I have no idea what the low-level transport needs are for XML output,
> but I suspect our present protocol is not it ...

The spec defines "mappings" between tables, schemas, and catalogs on the
one side and each time a pair of XML documents on the other side, one of
which is an XML schema document (sort of a document type declaration) and
the other is an XML data document that follows the constraints of the
schema document and contains the actual data. A table could of course
more or less be interpreted to mean a query result. That means, this
functionality provides both query result retrieval via XML and a pg_dump
type mechanism with XML output.

So I imagine, if this is done fully with changes in the protocol layer,
then certain commands like "get table schema in XML" would have to exist
in the protocol, which doesn't seem right. Also, the XML output isn't a
sibling of the current text/binary tuples, since an XML result is always
a whole document, not tuple data.

What we could perhaps consider is a family of functions like I
illustrated, but then provide a fast-path-driven layer on the client side,
like for large objects. Initially, the development of these mapping
functions could take place totally in user-space.

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-03-06 23:33:30 Re: XML ouput for psql
Previous Message Kevin Brown 2003-03-06 21:52:47 Re: [HACKERS] problems with dropped columns

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-03-06 23:33:30 Re: XML ouput for psql
Previous Message Peter Eisentraut 2003-03-06 23:07:20 Re: new format for describe (repost #2)