Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 154640 - dev-db/postgresql-8.1.4 'xml' USE flag does not add xml support
Summary: dev-db/postgresql-8.1.4 'xml' USE flag does not add xml support
Status: VERIFIED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Other
: High normal
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-09 23:14 UTC by Dennis
Modified: 2011-05-20 10:03 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis 2006-11-09 23:14:33 UTC
emerge -pv postgresql

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] dev-db/postgresql-8.1.4  USE="libg++ nls pam readline threads xml zlib -doc -kerberos -perl -pg-intdatetime -python (-selinux) -ssl -tcl -tk" 0 kB

When compiled with xml USE flag, eternal xml library is compiled but the server still has no support for XML.

If I run the pgxml.sql script provided by postgresql.com, I get the following ERROR: could not find function "xml_is_well_formed" in file "/usr/lib/postgresql/pgxml.so"
SQL state: 42883

emerge --info
Portage 2.1.1-r1 (default-linux/x86/2006.1/server, gcc-4.1.1, glibc-2.4-r3, 2.6.17-gentoo-r8 i686)
=================================================================
System uname: 2.6.17-gentoo-r8 i686 Intel(R) Pentium(R) 4 CPU 1500MHz
Gentoo Base System version 1.12.5
Last Sync: Tue, 07 Nov 2006 07:30:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: [Not Present]
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://ftp.ucsb.edu /pub/mirrors/linux/gentoo/ "
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 apache2 cli cracklib crypt elibc_glibc fortran gdbm iconv input_devices_evdev input_devices_keyboard input_devices_mouse kernel_linux libg++ logrotate mailwrapper ncurses nls nptl nptlonly pam pcre ppds readline reflection snmp spl ssl tcpd udev unicode userland_GNU video_cards_apm video_cards_ark video_cards_ati video_cards_chips video_cards_cirrus video_cards_cyrix video_cards_dummy video_cards_fbdev video_cards_glint video_cards_i128 video_cards_i740 video_cards_i810 video_cards_imstt video_cards_mga video_cards_neomagic video_cards_nsc video_cards_nv video_cards_rendition video_cards_s3 video_cards_s3virge video_cards_savage video_cards_siliconmotion video_cards_sis video_cards_sisusb video_cards_tdfx video_cards_tga video_cards_trident video_cards_tseng video_cards_v4l video_cards_vesa video_cards_vga video_cards_via video_cards_vmware video_cards_voodoo xml zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Dennis 2006-11-10 01:02:56 UTC
I got it to work by emerging the new ebuild of PostgreSQL 8.1.5 and then running this script from PgAdmin III

--SQL for XML parser

CREATE OR REPLACE FUNCTION xml_valid(text) RETURNS bool
	AS '/usr/lib/postgresql/pgxml.so' LANGUAGE 'c' STRICT IMMUTABLE;

CREATE OR REPLACE FUNCTION xml_encode_special_chars(text) RETURNS text
	AS '/usr/lib/postgresql/pgxml.so' LANGUAGE 'c' STRICT IMMUTABLE;

CREATE OR REPLACE FUNCTION xpath_string(text,text) RETURNS text
	AS '/usr/lib/postgresql/pgxml.so' LANGUAGE 'c' STRICT IMMUTABLE;

CREATE OR REPLACE FUNCTION xpath_nodeset(text,text,text,text) RETURNS text
	AS '/usr/lib/postgresql/pgxml.so' LANGUAGE 'c' STRICT IMMUTABLE;

CREATE OR REPLACE FUNCTION xpath_number(text,text) RETURNS float4
	AS '/usr/lib/postgresql/pgxml.so' LANGUAGE 'c' STRICT IMMUTABLE;

CREATE OR REPLACE FUNCTION xpath_bool(text,text) RETURNS boolean
	AS '/usr/lib/postgresql/pgxml.so' LANGUAGE 'c' STRICT IMMUTABLE;

-- List function

CREATE OR REPLACE FUNCTION xpath_list(text,text,text) RETURNS text
	AS '/usr/lib/postgresql/pgxml.so'
	LANGUAGE 'c' STRICT IMMUTABLE;


CREATE OR REPLACE FUNCTION xpath_list(text,text) RETURNS text 
AS 'SELECT xpath_list($1,$2,'','')' language 'SQL' STRICT IMMUTABLE;



-- Wrapper functions for nodeset where no tags needed


CREATE OR REPLACE FUNCTION xpath_nodeset(text,text) RETURNS text AS
'SELECT xpath_nodeset($1,$2,'''','''')' language 'SQL' STRICT IMMUTABLE;


CREATE OR REPLACE FUNCTION xpath_nodeset(text,text,text) RETURNS text AS
'SELECT xpath_nodeset($1,$2,'''',$3)' language 'SQL' STRICT IMMUTABLE;

-- Table function

CREATE OR REPLACE FUNCTION xpath_table(text,text,text,text,text) RETURNS setof record
	AS '/usr/lib/postgresql/pgxml.so'
	LANGUAGE 'c' STRICT STABLE;

-- XSLT functions
-- Delete from here to the end of the file if you are not compiling with
-- XSLT support.


CREATE OR REPLACE FUNCTION xslt_process(text,text,text) RETURNS text 
	AS '/usr/lib/postgresql/pgxml.so' LANGUAGE 'c' STRICT VOLATILE;

-- the function checks for the correct argument count

CREATE OR REPLACE FUNCTION xslt_process(text,text) RETURNS text 
	AS '/usr/lib/postgresql/pgxml.so' LANGUAGE 'c' STRICT IMMUTABLE;
Comment 2 Aaron W. Swenson gentoo-dev 2011-05-20 10:03:56 UTC
'xml' USE flag only builds the contrib module. Enabling support in the databases is the DBA's responsibility.