Re: [COMMITTERS] pgsql: Fix XMLTABLE on older libxml2

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [COMMITTERS] pgsql: Fix XMLTABLE on older libxml2
Дата
Msg-id 9178.1488995471@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [COMMITTERS] pgsql: Fix XMLTABLE on older libxml2  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-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


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: [COMMITTERS] pgsql: Silence compiler warnings in BitmapHeapNext().
Следующее
От: Stephen Frost
Дата:
Сообщение: [COMMITTERS] pgsql: Expose explain's SUMMARY option