Lists: | pgsql-hackers |
---|
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | contrib/xml2 regression tests vs no-libxslt build option |
Date: | 2010-03-01 15:32:32 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-hackers |
In yet another demonstration that no good deed goes unpunished, I see
that my addition of regression tests to contrib/xml2 is still a few
bricks shy of a load. Buildfarm member pika is failing on it, and the
reason is clear upon inspection: pika is configured --with-libxml
but not --with-libxslt, so the xslt_process calls fail.
The obvious thing to do about it is add a variant expected file, but
even that won't quite fix things, because of this part of the diff:
SET client_min_messages = warning;
\set ECHO none
+ psql:pgxml.sql:79: ERROR: could not find function "xslt_process" in file "/home/pgbuildfarm/workdir/HEAD/inst/lib/postgresql/pgxml.so"
+ psql:pgxml.sql:86: ERROR: could not find function "xslt_process" in file "/home/pgbuildfarm/workdir/HEAD/inst/lib/postgresql/pgxml.so"
RESET client_min_messages;
There's no way for a variant file to deal with the installation-specific
file path in those messages.
I could crank the SET client_min_messages up to PANIC to hide those
messages, but that risks losing important information when an unexpected
failure happens.
So it seems that the only really viable fix is to rearrange the code so
that when libxslt isn't available, the xslt_process() function is still
defined and available to CREATE FUNCTION; we can make it throw a runtime
error instead of just not being present. This seems like a good idea
anyway to make the module's ABI more stable: right now, if you dump and
restore from an installation with xslt support to one without, or vice
versa, you'll have problems with either missing or unloadable SQL
function definitions.
More work than I had really wanted to spend on xml2, but the alternative
is backing out those regression tests :-(
regards, tom lane
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: contrib/xml2 regression tests vs no-libxslt build option |
Date: | 2010-03-01 16:03:47 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Mon, Mar 1, 2010 at 10:32 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> In yet another demonstration that no good deed goes unpunished, I see
> that my addition of regression tests to contrib/xml2 is still a few
> bricks shy of a load. Buildfarm member pika is failing on it, and the
> reason is clear upon inspection: pika is configured --with-libxml
> but not --with-libxslt, so the xslt_process calls fail.
I thought the contrib makefile was set up to ignore xml2 if libxslt
wasn't being used.
...Robert
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: contrib/xml2 regression tests vs no-libxslt build option |
Date: | 2010-03-01 16:11:11 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> I thought the contrib makefile was set up to ignore xml2 if libxslt
> wasn't being used.
No, it ignores it if libxml2 isn't available. It can be built with
or without libxslt though.
regards, tom lane
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: contrib/xml2 regression tests vs no-libxslt build option |
Date: | 2010-03-01 16:32:24 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>
>> I thought the contrib makefile was set up to ignore xml2 if libxslt
>> wasn't being used.
>>
>
> No, it ignores it if libxml2 isn't available. It can be built with
> or without libxslt though.
>
>
>
ugh.
Maybe we need to set up a dummy function or two if not building with
xslt, like we do with the XML functions if not building with libxml.
cheers
andrew
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: contrib/xml2 regression tests vs no-libxslt build option |
Date: | 2010-03-01 16:44:20 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-hackers |
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Tom Lane wrote:
>> No, it ignores it if libxml2 isn't available. It can be built with
>> or without libxslt though.
> ugh.
> Maybe we need to set up a dummy function or two if not building with
> xslt, like we do with the XML functions if not building with libxml.
Right, that was exactly my proposal. The function should be there
always, but throw a run-time error if no xslt support.
regards, tom lane