Re: contrib/xml2 pfree bug - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: contrib/xml2 pfree bug
Date
Msg-id 4B8AD917.9040206@dunslane.net
Whole thread Raw
In response to Re: contrib/xml2 pfree bug  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: contrib/xml2 pfree bug
List pgsql-hackers

Tom Lane wrote:
> Andrew Dunstan <andrew@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


pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: Re: Hot Standby query cancellation and Streaming Replication integration
Next
From: Andrew Dunstan
Date:
Subject: Re: contrib/xml2 pfree bug