Re: XML ouput for psql

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: greg(at)turnstep(dot)com, pgsql-patches(at)postgresql(dot)org
Subject: Re: XML ouput for psql
Date: 2003-03-17 23:47:28
Message-ID: 200303172347.h2HNlS225075@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Tom Lane wrote:
> >> Not really; what of applications other than shell scripts that would
> >> like to get XML-formatted output?
>
> > Well, programs can run psql using popen. It seems overkill to get the
> > protocol involved, specially since it is output-only. I can't imagine
> > who would bother with the wire protocol messiness just to get xml.
>
> Having to popen a psql isn't overkill? This seems like a far messier
> solution than the other. Furthermore, it's just plain not an available
> solution in many scenarios (think of a Java program running JDBC; it may
> not have privileges to do popen, and may not have access to a copy of
> psql anyway).
>
> If we were not already opening up the protocol for changes, I'd be
> resistant to the idea too. But since we are, I think it should be fixed
> where it's cleanest to fix it.

What would be interesting would be to enable libpq to dump XML, and have
psql use that. Why put XML capability in the backend? Of course, that
doesn't help jdbc. How do you propose the backend would do XML?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-03-18 00:01:47 Re: analyze after a database restore?
Previous Message Tom Lane 2003-03-17 23:18:49 Re: XML ouput for psql

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2003-03-18 00:02:17 Re: psql patch (2)
Previous Message Tom Lane 2003-03-17 23:18:49 Re: XML ouput for psql