X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DC5778B9E98 for ; Wed, 23 Feb 2005 15:00:05 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 23426-09 for ; Wed, 23 Feb 2005 14:59:52 +0000 (GMT) Received: from pd6mo2no.prod.shaw.ca (idcmail-mo2no.cg.shawcable.net [64.59.134.9]) by svr1.postgresql.org (Postfix) with ESMTP id 761F58B9E49 for ; Wed, 23 Feb 2005 14:59:54 +0000 (GMT) Received: from pd6mr6no.prod.shaw.ca (pd6mr6no-qfe2.prod.shaw.ca [10.0.144.219]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0ICD000TYDNU9C70@l-daemon> for pgsql-sql@postgresql.org; Wed, 23 Feb 2005 07:59:54 -0700 (MST) Received: from pn7ml4no.prod.shaw.ca ([10.0.149.113]) by pd6mr6no.prod.shaw.ca (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0ICD00CDVDNUI4H0@pd6mr6no.prod.shaw.ca> for pgsql-sql@postgresql.org; Wed, 23 Feb 2005 07:59:54 -0700 (MST) Received: from Dell4500 (S01060004236fc1f7.wp.shawcable.net [24.77.13.13]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003)) with SMTP id <0ICD00IZNDNNQD@l-daemon> for pgsql-sql@postgresql.org; Wed, 23 Feb 2005 07:59:54 -0700 (MST) Date: Wed, 23 Feb 2005 08:59:56 -0600 From: George Weaver Subject: Re: Working with XML. To: Theo Galanakis Cc: pgsql-sql@postgresql.org Message-id: <006e01c519b8$591396a0$6400a8c0@Dell4500> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Mailer: Microsoft Outlook Express 6.00.2900.2180 Content-type: multipart/alternative; boundary="----=_NextPart_000_006B_01C51986.0BB4FD90" X-Priority: 3 X-MSMail-priority: Normal References: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.638 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, FORGED_RCVD_HELO, HTML_60_70, HTML_MESSAGE, HTML_TAG_EXIST_TBODY X-Spam-Level: * X-Archive-Number: 200502/272 X-Sequence-Number: 20382 This is a multi-part message in MIME format. ------=_NextPart_000_006B_01C51986.0BB4FD90 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MessageHi Theo, Hmm. Well we're getting into territory that's over my head. I've = simply been a user of xml2 and do not know much about its inner = workings. Just out of curiosity, what is the size of Sort_Mem in your = postgresql.conf? Regards, George ----- Original Message -----=20 From: Theo Galanakis=20 To: 'George Weaver'=20 Cc: 'pgsql-sql@postgresql.org'=20 Sent: Tuesday, February 22, 2005 4:13 PM Subject: Re: [SQL] Working with XML. George, I have run this SP in Cold Fusion, PgAdmin and EMS PostgreSQL = Manager 2, with all the same results. We are currently using Redhat ES3 = and Postgres 7.4.5. Theo -----Original Message----- From: George Weaver [mailto:gweaver@shaw.ca]=20 Sent: Wednesday, 23 February 2005 12:46 AM To: Theo Galanakis Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Working with XML. Hi Theo, I am not able to duplicate the problem you experienced. I tried the = query you provided below using pgAdmin and psql on a 7.3.2 and an 8.0 = database with success. I then copied all the rows and pasted them to = the end so that I would have 100 rows, and the query worked as expected. Perhaps the client you're using is causing the problem. Can you run = the query in pgAdmin? Regards, George ----- Original Message -----=20 From: Theo Galanakis=20 To: 'George Weaver'=20 Cc: 'pgsql-sql@postgresql.org'=20 Sent: Monday, February 21, 2005 11:54 PM Subject: RE: [SQL] Working with XML. Thankyou George, XML2 compiled ok... next stummbling block.. when I pass a very = long XML string to xpath_string() it crashes the postgres server. Client = receives a message like: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. Below is the function call, a smaller xml string with say 40 = records works fine, anything bigger crashes the server. select xpath_string(' = 7741872226632005-02-22 = = ______________________________________________________________________ This email, including attachments, is intended only for the = addressee and may be confidential, privileged and subject to copyright. If = you have received this email in error, please advise the sender and = delete it. If you are not the intended recipient of this email, you = must not use, copy or disclose its content to anyone. You must not copy = or=20 communicate to others content that is confidential or subject to = copyright, unless you have the consent of the content owner. =20 ------=_NextPart_000_006B_01C51986.0BB4FD90 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message
Hi Theo,
 
Hmm.  Well we're getting into = territory that's=20 over my head.  I've simply been a user of xml2 and do not know much = about=20 its inner workings.  Just out of curiosity, what is the size of = Sort_Mem in=20 your postgresql.conf?
 
Regards,
George
----- Original Message -----
From:=20 Theo Galanakis =
Sent: Tuesday, February 22, = 2005 4:13=20 PM
Subject: Re: [SQL] Working with = XML.

George,
 
    I have run this = SP in=20 Cold Fusion, PgAdmin and EMS PostgreSQL Manager 2, with all the same = results.=20 We are currently using Redhat ES3 and Postgres = 7.4.5.
 
Theo

 
-----Original=20 Message-----
From: George Weaver [mailto:gweaver@shaw.ca]=20
Sent: Wednesday, 23 February 2005 12:46 AM
To: = Theo=20 Galanakis
Cc: pgsql-sql@postgresql.org
= Subject:=20 Re: [SQL] Working with XML.

Hi Theo,
 
I am not able to duplicate the = problem you=20 experienced.  I tried the query you provided below using = pgAdmin=20 and psql on a 7.3.2 and an 8.0 database with success.  I then = copied=20 all the rows and pasted them to the end so that I would have 100 = rows, and=20 the query worked as expected.
 
Perhaps the client you're using is = causing the=20 problem.  Can you run the query in pgAdmin?
 
Regards,
George
----- Original Message ----- =
From:=20 Theo = Galanakis
Sent: Monday, February 21, = 2005 11:54=20 PM
Subject: RE: [SQL] Working = with=20 XML.

Thankyou George,
 
XML2 compiled ok... next=20 stummbling block..  when I pass a very long XML string=20 to xpath_string() it crashes the postgres server. Client = receives a=20 message like:
 
server closed the connection = unexpectedly
This=20 probably means the server terminated abnormally
before or while = processing the request.
 
Below is the function call, a smaller = xml string=20 with say 40 records works fine, anything bigger crashes the=20 server.
 
select = xpath_string('<?xml=20 version=3D"1.0" encoding=3D"UTF-8"?> <query columns=3D"4"=20 = rows=3D"50"><row><cola>774187</cola><colb>2226= 63</colb><colc>2005-02-22=20 <snip>
_________________________________________________________= _____________
This=20 email, including attachments, is intended only for the = addressee
and=20 may be confidential, privileged and subject to copyright. If = you
have=20 received this email in error, please advise the sender and = delete
it.=20 If you are not the intended recipient of this email, you must=20 not
use, copy or disclose its content to anyone. You must not = copy or=20
communicate to others content that is confidential or = subject to=20
copyright, unless you have the consent of the content=20 = owner.
------=_NextPart_000_006B_01C51986.0BB4FD90--