Thread: PostgreSQL and XML

PostgreSQL and XML

From
tom dyson
Date:
PostgreSQL users working with XML may be interested in my post at:

http://www.throwingbeans.org/tech/postgresql_and_xml.html

It explains the work I did with John Gray to enable XPath in SQL queries
against XML stored in Postgres text columns; my company is now using this
functionality in several large-scale implementations.

As far as I know, this represents the most complete XML support of any open
source RDBMS. I'll be very pleased to receive any questions or suggestions!

Best wishes

Tom

-----------------+
tom dyson
t: +44 (0)1608 811870
m: +44 (0)7958 752657
http://torchbox.com


Re: PostgreSQL and XML

From
Tony Grant
Date:
When searching the online docs  for

> PostgreSQL 7.3 allows UDFs to return multiple rows

I noticed the site is tits up because of a PHP error...

OK this won't make me very popular but why are you guys messing around
with this junk? PHP is for MySQL weenies... Real men use JSP!

OK so it is Friday afternoon - I'll just go to the fridge and get a beer
now...

Cheers

Tony Grant

--
www.tgds.net Library management software toolkit,
redhat linux on Sony Vaio C1XD,
Dreamweaver MX with Tomcat and PostgreSQL


Re: PostgreSQL and XML

From
"scott.marlowe"
Date:
On 14 Mar 2003, Tony Grant wrote:

> When searching the online docs  for
>
> > PostgreSQL 7.3 allows UDFs to return multiple rows
>
> I noticed the site is tits up because of a PHP error...
>
> OK this won't make me very popular but why are you guys messing around
> with this junk? PHP is for MySQL weenies... Real men use JSP!
>
> OK so it is Friday afternoon - I'll just go to the fridge and get a beer
> now...

Wow, what is it with you guys and your unsupported assertions against PHP
today.  First on hackers and now on general.  You don't PHP, don't use it.
You want the website done in JSP, then do it and quit bitching about
someone else's choice of tools.

It's not failing because of a PHP error.  did you look at the screen?
It's failing because the database isn't answering.  JSP wouldn't make it
any better, it would still be offline.

My PHP server stays up 24/7 under heavy load doing very complex things.
One machine, 99.99% uptime, no unscheduled downtime in two years.

Our JSP Server farm has failures every week, where some part of the
complex inner workings that is JSP fail for no apparent reason and needs
to be reset.  That's enterprise computing?  If it wasn't a failover of
three machines it would be offline for an hour or so a week.

I've seen as many unsupported assertions that "postgresql is a toy, use
oracle" before.

They're just as ugly no matter what you're talking about.  PHP works a
charm, and if you'd actually try and benchmark it against JSP you might be
surprised how much faster it is, especially under load.

Informed opinion is welcomed, but this kind of off the cuff slamming of
something you know so little about it just ugly.


Re: PostgreSQL and XML

From
"Gavin M. Roy"
Date:
I have to agree here.  I use php on a site that gets 13,000,000 hits a day, and has 1,600,000 visitors.  I don't have any problems.  It's a solid well development system, and all it takes is to configure the postgres daemon to accept as many connections as your webserver can handle.  No need to bash any language, each has their own niche, just as DBMS's do. 

Gavin

scott.marlowe wrote:
On 14 Mar 2003, Tony Grant wrote:
 
When searching the online docs  for 
   
PostgreSQL 7.3 allows UDFs to return multiple rows     
I noticed the site is tits up because of a PHP error...

OK this won't make me very popular but why are you guys messing around
with this junk? PHP is for MySQL weenies... Real men use JSP!

OK so it is Friday afternoon - I'll just go to the fridge and get a beer
now...   
Wow, what is it with you guys and your unsupported assertions against PHP 
today.  First on hackers and now on general.  You don't PHP, don't use it.  
You want the website done in JSP, then do it and quit bitching about 
someone else's choice of tools.
It's not failing because of a PHP error.  did you look at the screen?  
It's failing because the database isn't answering.  JSP wouldn't make it 
any better, it would still be offline.

My PHP server stays up 24/7 under heavy load doing very complex things.  
One machine, 99.99% uptime, no unscheduled downtime in two years.

Our JSP Server farm has failures every week, where some part of the 
complex inner workings that is JSP fail for no apparent reason and needs 
to be reset.  That's enterprise computing?  If it wasn't a failover of 
three machines it would be offline for an hour or so a week.

I've seen as many unsupported assertions that "postgresql is a toy, use 
oracle" before.

They're just as ugly no matter what you're talking about.  PHP works a 
charm, and if you'd actually try and benchmark it against JSP you might be 
surprised how much faster it is, especially under load.

Informed opinion is welcomed, but this kind of off the cuff slamming of 
something you know so little about it just ugly.


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command   (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
 

Re: PostgreSQL and XML

From
Tony Grant
Date:
On Fri, 2003-03-14 at 19:16, scott.marlowe wrote:

> > OK so it is Friday afternoon - I'll just go to the fridge and get a beer
> > now...
>
> Wow, what is it with you guys and your unsupported assertions against PHP
> today.  First on hackers and now on general.  You don't PHP, don't use it.
> You want the website done in JSP, then do it and quit bitching about
> someone else's choice of tools.

Tongue in cheek Friday nonsense OK.

I don't like or use PHP for personal reasons but it was just a bit of
end of week fun in very bad taste.

It is called unwinding.

No harm meant. No harm felt?

Cheers

Tony Grant
--
www.tgds.net Library management software toolkit,
redhat linux on Sony Vaio C1XD,
Dreamweaver MX with Tomcat and PostgreSQL


Re: PostgreSQL and XML

From
"Gavin M. Roy"
Date:
BTW Awesome work, would love to see this included in upcoming releases.

Gavin

tom dyson wrote:

>PostgreSQL users working with XML may be interested in my post at:
>
>http://www.throwingbeans.org/tech/postgresql_and_xml.html
>
>It explains the work I did with John Gray to enable XPath in SQL queries
>against XML stored in Postgres text columns; my company is now using this
>functionality in several large-scale implementations.
>
>As far as I know, this represents the most complete XML support of any open
>source RDBMS. I'll be very pleased to receive any questions or suggestions!
>
>Best wishes
>
>Tom
>
>-----------------+
>tom dyson
>t: +44 (0)1608 811870
>m: +44 (0)7958 752657
>http://torchbox.com
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 5: Have you checked our extensive FAQ?
>
>http://www.postgresql.org/docs/faqs/FAQ.html
>
>
>



Re: PostgreSQL and XML

From
"scott.marlowe"
Date:
On 14 Mar 2003, Tony Grant wrote:

> On Fri, 2003-03-14 at 19:16, scott.marlowe wrote:
>
> > > OK so it is Friday afternoon - I'll just go to the fridge and get a beer
> > > now...
> >
> > Wow, what is it with you guys and your unsupported assertions against PHP
> > today.  First on hackers and now on general.  You don't PHP, don't use it.
> > You want the website done in JSP, then do it and quit bitching about
> > someone else's choice of tools.
>
> Tongue in cheek Friday nonsense OK.
>
> I don't like or use PHP for personal reasons but it was just a bit of
> end of week fun in very bad taste.
>
> It is called unwinding.
>
> No harm meant. No harm felt?

It's ok, but it gets real old when, after a year or two, you constantly
hear how PHP is crap and JSP is the only way to go, when the people saying
it are in the marketing or sales department and wouldn't know java or php
code if it bit them on the buttocks.  Yet, they parrot this stale old
stuff over and over, and eventually, they really do start to affect policy
decisions based on emotion rather than logic.

Being of Vulcan descent, this bugs me to no end.

Plus, do you really want all the PHP folks to stick to MySQL and never
learn Postgresql?  PHP may well be your biggest potential market.  If a
new PHP developer is reading this list, he may well have headed over to
MySQL to see what it has to offer, since he's not gonna feel very welcome
here.

Besides, we all know the one true language is RPL...  :-)


Re: PostgreSQL and XML

From
Kaare Rasmussen
Date:
> Besides, we all know the one true language is RPL...  :-)

Funny way to spell Perl :-)

--
Kaare Rasmussen            --Linux, spil,--        Tlf:        3816 2582
Kaki Data                tshirts, merchandize      Fax:        3816 2501
Howitzvej 75               Åben 12.00-18.00        Email: kar@kakidata.dk
2000 Frederiksberg        Lørdag 12.00-16.00       Web:      www.suse.dk

Re: PostgreSQL and XML

From
John Gray
Date:
On Thu, 03 Mar 2005 07:59:14 +0000, Mario Splivalo wrote:

> Can I use XPath queries in any form to retrive data from XML documents and
> 'transfer' them to table-like sets?
>
 Basically, yes - if you look at the README for contrib/xml2 in the
PostgreSQL source distribution (v8.0.1) there is an example using the
xpath_table function which allows you to run several XPath expressions in
parallel against a set of rows and turn the result into a table. To use
this functionality you will need to build the contrib/xml2 mocule - your
machine will need libxml (http://xmlsoft.org/)

> Something as MSSQL's OPENXML keyword?
>
In a way (from reading half a webpage) - I'm not a user of MSSQL so I
can't really compare against how their functions work!

Regards

John