Skip site navigation (1) Skip section navigation (2)

Re: contrib/xml2 pfree bug

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: contrib/xml2 pfree bug
Date: 2010-02-28 21:06:40
Message-ID: 4B8ADAE0.804@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-hackers

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

In response to

pgsql-hackers by date

Next:From: Joachim WielandDate: 2010-02-28 21:42:00
Subject: Re: Re: Hot Standby query cancellation and Streaming Replication integration
Previous:From: Andrew DunstanDate: 2010-02-28 20:59:03
Subject: Re: contrib/xml2 pfree bug

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group