From: | greg(at)turnstep(dot)com |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: XML ouput for psql |
Date: | 2003-03-04 19:50:12 |
Message-ID: | 45b110217e4cd5ac8bd4429928a56ba1@biglumber.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> The XML standard does not call for any table format. But a number of
> table formats have been established within the XML framework. Some of
> them are formatting-oriented (e.g., the HTML model, or CALS which is used
> in DocBook) and some of them are processing-oriented (e.g., SQL/XML).
> Which do we need? And which do we need from psql in particular (keeping
> in mind that psql is primarily for interactive use and shell-scripting)?
> In any case, it should most likely be a standard table model and not a
> hand-crafted one.
I think all psql needs is a simple output, similar to the ones used by
Oracle, Sybase, and MySQL; the calling application should then process
it in some way as needed (obviously this is not for interactive use).
Where can one find a "standard table model?"
All of the DBs I mentioned (and the perl module DBIx:XML_RDB) all share
a similar theme, with subtle differences (i.e. some use <row>, some
<row num="x">, some have <rowset>). I'd be happy to write whatever
format we can find or develop. My personal vote is the DBIx::XML_RDB
format, perhaps with the row number that Oracle uses, producing this:
<?xml version="1.0"?>
<RESULTSET statement="select * from xmltest">
<ROW num="1">
<scoops>3</scoops>
<flavor>chocolate</flavor>
</ROW>
<ROW num="2">
<scoops>2</scoops>
<flavor>vanilla</flavor>
</ROW>
</RESULTSET>
> (If, for whatever reason, we go the "processing-oriented" route, then I
> claim that there should not be a different output with and without \x
> mode.)
I agree with this.
- --
Greg Sabino Mullane greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200303041444
-----BEGIN PGP SIGNATURE-----
Comment: http://www.turnstep.com/pgp.html
iD8DBQE+ZQJNvJuQZxSWSsgRArGEAKD4xs+4Ns3syG175T3k80B6MvNJvgCbBkvF
hCkf5SMjLzMJ84uMl1w4tMY=
=a2Uq
-----END PGP SIGNATURE-----
From | Date | Subject | |
---|---|---|---|
Next Message | greg | 2003-03-04 20:24:08 | Error codes revisited |
Previous Message | Brian Walker | 2003-03-04 19:21:15 | Problem with foreign keys (performance and deadlocks) |
From | Date | Subject | |
---|---|---|---|
Next Message | Alan Gutierrez | 2003-03-04 20:44:39 | Re: XML ouput for psql |
Previous Message | Rod Taylor | 2003-03-04 16:16:20 | Re: [PATCHES] ALTER SEQUENCE |