recent --with-libxml support

From: Jeremy Drake <pgsql(at)jdrake(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: recent --with-libxml support
Date: 2006-12-22 17:46:35
Message-ID: Pine.BSO.4.64.0612212249000.8221@resin.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I adjusted my buildfarm config (mongoose) to attempt to build HEAD
--with-libxml. I added the following to build-farm.conf:

if ($branch eq 'HEAD' || $branch ge 'REL8_3')
{
push(@{$conf{config_opts}},
"--with-includes=/usr/include/et:/usr/include/libxml2");
push(@{$conf{config_opts}}, "--with-libxml");
}

As seen, I needed to add an include dir for configure to pass. However,
make check fails now with the backend crashing. This can be seen in the
buildfarm results for mongoose.

According to gentoo portage, I have libxml2 version 2.6.26 installed on my
system.

I am not clear if I should have pointed it at libxml version 1 or 2, but
configure seemed to be happy with libxml2. If it needs version 1, perhaps
configure should do something to keep it from using version 2.

Here is the diff for the xml regression test:

*** ./expected/xml.out Thu Dec 21 16:47:22 2006
--- ./results/xml.out Thu Dec 21 16:59:32 2006
***************
*** 58,68 ****
SELECT xmlelement(name element,
xmlattributes (1 as one, 'deuce' as two),
'content');
! xmlelement
! ------------------------------------------------
! <element one="1" two="deuce">content</element>
! (1 row)
!
SELECT xmlelement(name element,
xmlattributes ('unnamed and wrong'));
ERROR: unnamed attribute value must be a column reference
--- 58,64 ----
SELECT xmlelement(name element,
xmlattributes (1 as one, 'deuce' as two),
'content');
! ERROR: cache lookup failed for type 0
SELECT xmlelement(name element,
xmlattributes ('unnamed and wrong'));
ERROR: unnamed attribute value must be a column reference
***************
*** 73,145 ****
(1 row)

SELECT xmlelement(name employee, xmlforest(name, age, salary as pay)) FROM emp;
! xmlelement
! ----------------------------------------------------------------------
! <employee><name>sharon</name><age>25</age><pay>1000</pay></employee>
! <employee><name>sam</name><age>30</age><pay>2000</pay></employee>
! <employee><name>bill</name><age>20</age><pay>1000</pay></employee>
! <employee><name>jeff</name><age>23</age><pay>600</pay></employee>
! <employee><name>cim</name><age>30</age><pay>400</pay></employee>
! <employee><name>linda</name><age>19</age><pay>100</pay></employee>
! (6 rows)
!
! SELECT xmlelement(name wrong, 37);
! ERROR: argument of XMLELEMENT must be type xml, not type integer
! SELECT xmlpi(name foo);
! xmlpi
! ---------
! <?foo?>
! (1 row)
!
! SELECT xmlpi(name xmlstuff);
! ERROR: invalid XML processing instruction
! DETAIL: XML processing instruction target name cannot start with "xml".
! SELECT xmlpi(name foo, 'bar');
! xmlpi
! -------------
! <?foo bar?>
! (1 row)
!
! SELECT xmlpi(name foo, 'in?>valid');
! ERROR: invalid XML processing instruction
! DETAIL: XML processing instruction cannot contain "?>".
! SELECT xmlroot (
! xmlelement (
! name gazonk,
! xmlattributes (
! 'val' AS name,
! 1 + 1 AS num
! ),
! xmlelement (
! NAME qux,
! 'foo'
! )
! ),
! version '1.0',
! standalone yes
! );
! xmlroot
! ------------------------------------------------------------------------------------------
! <?xml version="1.0" standalone="yes"?><gazonk name="val" num="2"><qux>foo</qux></gazonk>
! (1 row)
!
! SELECT xmlserialize(content data as character varying) FROM xmltest;
! data
! --------------------
! <value>one</value>
! <value>two</value>
! (2 rows)
!
! -- Check mapping SQL identifier to XML name
! SELECT xmlpi(name ":::_xml_abc135.%-&_");
! xmlpi
! -------------------------------------------------
! <?_x003A_::_x005F_xml_abc135._x0025_-_x0026__?>
! (1 row)
!
! SELECT xmlpi(name "123");
! xmlpi
! ---------------
! <?_x0031_23?>
! (1 row)
!
--- 69,75 ----
(1 row)

SELECT xmlelement(name employee, xmlforest(name, age, salary as pay)) FROM emp;
! server closed the connection unexpectedly
! This probably means the server terminated abnormally
! before or while processing the request.
! connection to server was lost

--
The very powerful and the very stupid have one thing in common.
Instead of altering their views to fit the facts, they alter the facts
to fit their views ... which can be very uncomfortable if you happen to
be one of the facts that needs altering.
-- Doctor Who, "Face of Evil"

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-12-22 17:56:30 Re: Companies Contributing to Open Source
Previous Message Gregory Stark 2006-12-22 15:48:23 Re: Operator class group proposal