From: Tom Lane on 28 Feb 2010 15:15 Andrew Dunstan <andrew(a)dunslane.net> writes: > Didn't we just clean up a mess in our XML handling to do with memory > handlers? It looks like contrib/xml2 might have similar problems. BTW, I couldn't duplicate this because I don't know what cb_ob_invoice_xml(1,1) refers to. Can you provide a self-contained example? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Andrew Dunstan on 28 Feb 2010 15:59 Tom Lane wrote: > Andrew Dunstan <andrew(a)dunslane.net> writes: > >> Didn't we just clean up a mess in our XML handling to do with memory >> handlers? It looks like contrib/xml2 might have similar problems. >> > > BTW, I couldn't duplicate this because I don't know what > cb_ob_invoice_xml(1,1) refers to. Can you provide a self-contained > example? > Almost any XML will do for the first param. e.g.: select xslt_process( query_to_xml('select x from generate_series(1,5) as x',true,false,'')::text, $$<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" indent="yes" /> <xsl:template match="*"> <xsl:copy> <xsl:copy-of select="@*" /> <xsl:apply-templates /> </xsl:copy> </xsl:template> <xsl:template match="comment()|processing-instruction()"> <xsl:copy /> </xsl:template> </xsl:stylesheet> $$::text); cheers andrew -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Andrew Dunstan on 28 Feb 2010 16:06 Andrew Dunstan wrote: > > > > Almost any XML will do for the first param. e.g.: It looks like you need to make sure the XML library is called first to induce the crash, so before doing what's below, do: select query_to_xml('select 1 as x',true,false,''): > > select xslt_process( query_to_xml('select x from generate_series(1,5) > as x',true,false,'')::text, > $$<xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > <xsl:output method="xml" indent="yes" /> > <xsl:template match="*"> > <xsl:copy> > <xsl:copy-of select="@*" /> > <xsl:apply-templates /> > </xsl:copy> > </xsl:template> > <xsl:template match="comment()|processing-instruction()"> > <xsl:copy /> > </xsl:template> > </xsl:stylesheet> > $$::text); > cheers andrew -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
|
Pages: 1 Prev: [GENERAL] trouble with to_char('L') Next: contrib/xml2 vs core xml in 8.3 |