views:

39

answers:

1

I'd like to write stored procedures in pgSQL that dynamically generate web-ready data. I need a pure SQL to HTML or SQL to XML gateway. Oracle has OWA. In Oracle you can setup a RAC frontend to a SAN and connect a large set of OWA hosts to your RAC so you
layer your web requests and spread your queries.

What is the PostgresSQL or MySQL equivalent? I'm not looking at getting the data out of the DB, then processing it via Python or Ruby. Is something like
this even possible in PostgresSQL?

From experience, stored SQL procedures are better at moving/calculating large datasets than piping the SQL query/cursor/proc result set to a middleware Python/Ruby/Perl/PHP
that then process the data and send it to the web browser.

A: 

PostgreSQL has a host of functions that allow you to convert from tables/schemas/queries to XML ( http://www.postgresql.org/docs/8.4/static/functions-xml.html ) as well as a built-in XML datatype ( http://www.postgresql.org/docs/8.4/static/datatype-xml.html ).

Unfortunately, I can't give much more information than that as I'm not an XML guy but hopefully these references will make sense to you. ;)

Matthew Wood