pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-committers@postgresql.org
Subject: Re: pgsql: Fix XMLTABLE on older libxml2
Date: Wed, 08 Mar 2017 12:51:11 -0500
Message-ID: <9178.1488995471@sss.pgh.pa.us> (raw)
In-Reply-To: <E1cleUA-0001QS-1r@gemulon.postgresql.org>
References: <E1cleUA-0001QS-1r@gemulon.postgresql.org>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> Fix XMLTABLE on older libxml2
> libxml2 older than 2.9.1 does not have xmlXPathSetContextNode (released
> in 2013, so reasonable platforms have trouble).  That function is fairly
> trivial, so I have inlined it in the one added caller.  This passes
> tests on my machine; let's see what the buildfarm thinks about it.

> Per joint complaint from Tom Lane and buildfarm.

Thanks, this works for me.  At some point we might need to do this more
honestly, ie add a configure probe and do

#ifdef HAVE_XMLXPATHSETCONTEXTNODE
       xmlXPathSetContextNode(cur, xtCxt->xpathcxt);
#else
       xtCxt->xpathcxt->node = cur;
#endif

but that can probably wait until libxml does something that breaks
the direct-assignment coding.  If the latter is the way you were
supposed to do it before, I think they'd be hesitant to break it.

			regards, tom lane


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



view thread (2+ messages)

Message-ID: <9178.1488995471@sss.pgh.pa.us>
Permalink:  ../9178.1488995471@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9178.1488995471@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org
  Subject: Re: pgsql: Fix XMLTABLE on older libxml2
  In-Reply-To: <9178.1488995471@sss.pgh.pa.us>
  References: <E1cleUA-0001QS-1r@gemulon.postgresql.org> <9178.1488995471@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox