hello,

i would like to begin work on the TODO item
  Allow backend to output result sets in XML

i would like to know if anyone has already
begun work on this item. if someone has
already started work, i would love to help! 

thanks much in advance,

b


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

Mon, 19 Jan 2004 22:33:42 -0800 (PST)
Brian Moore <brianmooreca@yahoo.com>
Allow backend to output result sets in XML
Brian Moore <brianmooreca@yahoo.com> writes:
> i would like to begin work on the TODO item
>   Allow backend to output result sets in XML

I am not sure why it's phrased that way --- surely the code to hack on
is the client side, not the backend.  Otherwise you need a protocol
revision to make this happen, which implies hacking *both* ends.

psql already has some code to output results as HTML tables; I'd think
adding functionality in that vicinity would be the way to go.

			regards, tom lane

Tue, 20 Jan 2004 10:36:34 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: Allow backend to output result sets in XML 
Brian Moore wrote:
> i would like to begin work on the TODO item
>   Allow backend to output result sets in XML

Implementing this on the client side seems cleaner (and is trivial to 
implement).  Some people have in fact already done that.  Search the 
archives.


Tue, 20 Jan 2004 23:26:53 +0100
Peter Eisentraut <peter_e@gmx.net>
Re: Allow backend to output result sets in XML
Tom Lane <tgl@sss.pgh.pa.us> writes:

> Brian Moore <brianmooreca@yahoo.com> writes:
> > i would like to begin work on the TODO item
> >   Allow backend to output result sets in XML
> 
> I am not sure why it's phrased that way --- surely the code to hack on
> is the client side, not the backend.  Otherwise you need a protocol
> revision to make this happen, which implies hacking *both* ends.

Presumably libpq would continue to use the binary protocol, but other clients
could bypass libpq and just stream ascii xml queries.

Personally I don't see any point in xml, but if there was a standard query
protocol then a client could send queries to any database that supported it
without using any libraries. That might be useful. Of course you could do that
without xml, but people seem to get more excited about complying with
standards when they invoke xml.

> psql already has some code to output results as HTML tables; I'd think
> adding functionality in that vicinity would be the way to go.

That could also be useful, mainly in that it could include the data from the
query, as well as some meta data. Allowing import tools for programs like
spreadsheets to do more intelligent things with the data than currently.

-- 
greg


21 Jan 2004 09:42:53 -0500
Greg Stark <gsstark@mit.edu>
Re: Allow backend to output result sets in XML
Greg Stark wrote:

>Tom Lane <tgl@sss.pgh.pa.us> writes:
>
>  
>
>>Brian Moore <brianmooreca@yahoo.com> writes:
>>    
>>
>>>i would like to begin work on the TODO item
>>>  Allow backend to output result sets in XML
>>>      
>>>
>>I am not sure why it's phrased that way --- surely the code to hack on
>>is the client side, not the backend.  Otherwise you need a protocol
>>revision to make this happen, which implies hacking *both* ends.
>>    
>>
>
>Presumably libpq would continue to use the binary protocol, but other clients
>could bypass libpq and just stream ascii xml queries.
>  
>
I would think that you would still use libpq with the binary protocol 
that understood an xml header request
of some sort??

J



>Personally I don't see any point in xml, but if there was a standard query
>protocol then a client could send queries to any database that supported it
>without using any libraries. That might be useful. Of course you could do that
>without xml, but people seem to get more excited about complying with
>standards when they invoke xml.
>
>  
>
>>psql already has some code to output results as HTML tables; I'd think
>>adding functionality in that vicinity would be the way to go.
>>    
>>
>
>That could also be useful, mainly in that it could include the data from the
>query, as well as some meta data. Allowing import tools for programs like
>spreadsheets to do more intelligent things with the data than currently.
>
>  
>


-- 
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd@commandprompt.com - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL








Greg Stark wrote:

Tom Lane <tgl@sss.pgh.pa.us> writes:

  

Brian Moore <brianmooreca@yahoo.com> writes:
    

i would like to begin work on the TODO item
  Allow backend to output result sets in XML
      

I am not sure why it's phrased that way --- surely the code to hack on
is the client side, not the backend.  Otherwise you need a protocol
revision to make this happen, which implies hacking *both* ends.
    


Presumably libpq would continue to use the binary protocol, but other clients
could bypass libpq and just stream ascii xml queries.
  

I would think that you would still use libpq with the binary protocol
that understood an xml header request
of some sort??

J





Personally I don't see any point in xml, but if there was a standard query
protocol then a client could send queries to any database that supported it
without using any libraries. That might be useful. Of course you could do that
without xml, but people seem to get more excited about complying with
standards when they invoke xml.

  

psql already has some code to output results as HTML tables; I'd think
adding functionality in that vicinity would be the way to go.
    


That could also be useful, mainly in that it could include the data from the
query, as well as some meta data. Allowing import tools for programs like
spreadsheets to do more intelligent things with the data than currently.

  



-- 
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd@commandprompt.com - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL
Wed, 21 Jan 2004 08:10:01 -0800
"Joshua D. Drake" <jd@commandprompt.com>
Re: Allow backend to output result sets in XML
Tom Lane wrote:
> Brian Moore <brianmooreca@yahoo.com> writes:
> > i would like to begin work on the TODO item
> >   Allow backend to output result sets in XML
>
> I am not sure why it's phrased that way --- surely the code to hack
> on is the client side, not the backend.  Otherwise you need a
> protocol revision to make this happen, which implies hacking *both*
> ends.
>
> psql already has some code to output results as HTML tables; I'd
> think adding functionality in that vicinity would be the way to go.

Converting a libpq result set (or a JDBC result set or ...) to an XML 
document should be a trivial string concatenation job that anyone can 
implement in half an hour.  The more interesting questions are: what 
XML schema do you want to use and why?  What do you want to do with the 
XML in the first place?  Would a streaming interface be a better?  Do 
you want a text document or a preparsed structure?  What good would a, 
say, libpq implementation be if it's more work to make a wrapper in one 
of the other language bindings than implement it from scratch there?

I think "output XML" is just buzz.  Give us a real use scenario and an 
indication that a majority also has that use scenario (vs. the other 
ones listed above), then we can talk.


Wed, 21 Jan 2004 19:19:45 +0100
Peter Eisentraut <peter_e@gmx.net>
Re: Allow backend to output result sets in XML
On Jan 21, 2004, at 12:19 PM, Peter Eisentraut wrote:
> I think "output XML" is just buzz.  Give us a real use scenario and an
> indication that a majority also has that use scenario (vs. the other
> ones listed above), then we can talk.

I do this all the time.

I have JDBC code to take a java.sql.ResultSet and push out SAX events 
in a standard schema. I also have a XSLT stylesheet that formats them 
in a decent way. In this manner, it's very easy for me to make 
database-driven webpages. I can inherit the "normal" stylesheet and 
then just code the exceptions.

However, I'm quite happy doing this on the client side. I'm not sure 
why it would be beneficial to do this as part of the PostgreSQL server.

Scott Lamb


Thu, 22 Jan 2004 21:04:19 -0600
Scott Lamb <slamb@slamb.org>
Re: Allow backend to output result sets in XML