head	1.14;
access;
symbols
	REL9_0_0:1.14
	REL9_1_ALPHA1:1.14
	REL9_0_RC1:1.14
	REL9_0_BETA4:1.14
	REL9_0_STABLE:1.14.0.4
	REL9_0_BETA3:1.14
	REL9_0_BETA2:1.14
	REL8_0_25:1.5.4.4
	REL8_1_21:1.6.2.4
	REL8_2_17:1.8.2.3
	REL8_3_11:1.11.2.3
	REL8_4_4:1.12.2.2
	REL9_0_BETA1:1.14
	REL9_0_ALPHA5_BRANCH:1.14.0.2
	REL9_0_ALPHA5:1.14
	REL8_0_24:1.5.4.4
	REL8_1_20:1.6.2.4
	REL8_2_16:1.8.2.3
	REL8_3_10:1.11.2.3
	REL8_4_3:1.12.2.2
	REL9_0_ALPHA4:1.12
	REL9_0_ALPHA4_BRANCH:1.12.0.10
	REL8_5_ALPHA3:1.12
	REL8_5_ALPHA3_BRANCH:1.12.0.8
	REL8_0_23:1.5.4.2
	REL8_1_19:1.6.2.2
	REL8_2_15:1.8.2.1
	REL8_3_9:1.11.2.1
	REL8_4_2:1.12
	REL8_5_ALPHA2:1.12
	REL8_5_ALPHA2_BRANCH:1.12.0.6
	REL8_0_22:1.5.4.2
	REL8_1_18:1.6.2.2
	REL8_2_14:1.8.2.1
	REL8_3_8:1.11.2.1
	REL8_4_1:1.12
	REL8_5_ALPHA1:1.12
	REL8_5_ALPHA1_BRANCH:1.12.0.4
	REL8_4_STABLE:1.12.0.2
	REL8_4_0:1.12
	REL8_4_RC2:1.12
	REL8_4_RC1:1.12
	REL8_4_BETA2:1.12
	REL8_4_BETA1:1.12
	REL8_0_21:1.5.4.2
	REL8_1_17:1.6.2.2
	REL8_2_13:1.8.2.1
	REL8_3_7:1.11.2.1
	REL8_0_20:1.5.4.2
	REL8_1_16:1.6.2.2
	REL8_2_12:1.8.2.1
	REL8_3_6:1.11.2.1
	REL8_0_19:1.5.4.2
	REL8_1_15:1.6.2.2
	REL8_2_11:1.8.2.1
	REL8_3_5:1.11.2.1
	REL8_0_18:1.5.4.2
	REL8_1_14:1.6.2.2
	REL8_2_10:1.8.2.1
	REL8_3_4:1.11.2.1
	REL8_0_17:1.5.4.2
	REL8_1_13:1.6.2.2
	REL8_2_9:1.8.2.1
	REL8_3_3:1.11.2.1
	REL8_0_16:1.5.4.2
	REL8_1_12:1.6.2.2
	REL8_2_8:1.8.2.1
	REL8_3_2:1.11.2.1
	REL8_2_7:1.8
	REL8_3_1:1.11
	REL8_3_STABLE:1.11.0.2
	REL8_3_0:1.11
	REL8_3_RC2:1.11
	REL8_0_15:1.5.4.1
	REL8_1_11:1.6.2.1
	REL8_2_6:1.8
	REL8_3_RC1:1.11
	REL8_3_BETA4:1.11
	REL8_3_BETA3:1.11
	REL8_3_BETA2:1.10
	REL8_3_BETA1:1.10
	REL8_0_14:1.5.4.1
	REL8_1_10:1.6.2.1
	REL8_2_5:1.8
	REL8_0_13:1.5.4.1
	REL8_1_9:1.6.2.1
	REL8_2_4:1.8
	REL8_0_12:1.5.4.1
	REL8_1_8:1.6.2.1
	REL8_2_3:1.8
	REL8_0_11:1.5.4.1
	REL8_1_7:1.6.2.1
	REL8_2_2:1.8
	REL8_0_10:1.5.4.1
	REL8_1_6:1.6.2.1
	REL8_2_1:1.8
	REL8_2_STABLE:1.8.0.2
	REL8_2_0:1.8
	REL8_2_RC1:1.8
	REL8_2_BETA3:1.8
	REL8_2_BETA2:1.8
	REL8_1_5:1.6.2.1
	REL8_0_9:1.5.4.1
	REL8_2_BETA1:1.8
	REL8_0_8:1.5.4.1
	REL8_1_4:1.6.2.1
	REL8_0_7:1.5
	REL8_1_3:1.6
	REL8_0_6:1.5
	REL8_1_2:1.6
	REL8_0_5:1.5
	REL8_1_1:1.6
	REL8_1_STABLE:1.6.0.2
	REL8_1_0:1.6
	REL8_1_0RC1:1.6
	REL8_1_0BETA4:1.6
	REL8_1_0BETA3:1.6
	REL8_0_4:1.5
	REL8_1_0BETA2:1.5
	REL8_1_0BETA1:1.5
	REL8_0_3:1.5
	REL8_0_2:1.5
	REL8_0_1:1.5
	REL8_0_STABLE:1.5.0.4
	REL8_0_0:1.5.0.2
	REL8_0_0RC5:1.5
	REL8_0_0RC4:1.5
	REL8_0_0RC3:1.5
	REL8_0_0RC2:1.5
	REL8_0_0RC1:1.5
	REL8_0_0BETA5:1.5
	REL8_0_0BETA4:1.4
	REL8_0_0BETA3:1.4
	REL8_0_0BETA2:1.4
	REL8_0_0BETA1:1.3;
locks; strict;
comment	@# @;


1.14
date	2010.03.01.18.07.59;	author tgl;	state Exp;
branches;
next	1.13;

1.13
date	2010.02.28.21.31.57;	author tgl;	state Exp;
branches;
next	1.12;

1.12
date	2008.05.08.16.49.37;	author tgl;	state Exp;
branches
	1.12.2.1;
next	1.11;

1.11
date	2007.11.10.23.59.52;	author momjian;	state Exp;
branches
	1.11.2.1;
next	1.10;

1.10
date	2007.06.26.22.05.04;	author tgl;	state Exp;
branches;
next	1.9;

1.9
date	2007.02.09.17.04.00;	author petere;	state Exp;
branches;
next	1.8;

1.8
date	2006.03.10.15.39.42;	author tgl;	state Exp;
branches
	1.8.2.1;
next	1.7;

1.7
date	2006.02.27.12.54.39;	author petere;	state Exp;
branches;
next	1.6;

1.6
date	2005.09.27.17.13.13;	author tgl;	state Exp;
branches
	1.6.2.1;
next	1.5;

1.5
date	2004.11.04.06.09.26;	author neilc;	state Exp;
branches
	1.5.4.1;
next	1.4;

1.4
date	2004.08.20.20.13.10;	author momjian;	state Exp;
branches;
next	1.3;

1.3
date	2004.03.14.03.19.13;	author momjian;	state Exp;
branches;
next	1.2;

1.2
date	2004.03.05.20.01.46;	author momjian;	state Exp;
branches;
next	1.1;

1.1
date	2004.03.05.03.57.58;	author momjian;	state Exp;
branches;
next	;

1.5.4.1
date	2006.03.10.15.40.06;	author tgl;	state Exp;
branches;
next	1.5.4.2;

1.5.4.2
date	2008.05.08.17.11.52;	author tgl;	state Exp;
branches;
next	1.5.4.3;

1.5.4.3
date	2010.03.01.03.41.29;	author tgl;	state Exp;
branches;
next	1.5.4.4;

1.5.4.4
date	2010.03.01.18.08.40;	author tgl;	state Exp;
branches;
next	;

1.6.2.1
date	2006.03.10.15.39.53;	author tgl;	state Exp;
branches;
next	1.6.2.2;

1.6.2.2
date	2008.05.08.17.11.41;	author tgl;	state Exp;
branches;
next	1.6.2.3;

1.6.2.3
date	2010.03.01.03.41.22;	author tgl;	state Exp;
branches;
next	1.6.2.4;

1.6.2.4
date	2010.03.01.18.08.34;	author tgl;	state Exp;
branches;
next	;

1.8.2.1
date	2008.05.08.17.11.33;	author tgl;	state Exp;
branches;
next	1.8.2.2;

1.8.2.2
date	2010.03.01.03.41.17;	author tgl;	state Exp;
branches;
next	1.8.2.3;

1.8.2.3
date	2010.03.01.18.08.27;	author tgl;	state Exp;
branches;
next	;

1.11.2.1
date	2008.05.08.16.49.47;	author tgl;	state Exp;
branches;
next	1.11.2.2;

1.11.2.2
date	2010.03.01.03.41.11;	author tgl;	state Exp;
branches;
next	1.11.2.3;

1.11.2.3
date	2010.03.01.18.08.16;	author tgl;	state Exp;
branches;
next	;

1.12.2.1
date	2010.03.01.03.41.04;	author tgl;	state Exp;
branches;
next	1.12.2.2;

1.12.2.2
date	2010.03.01.18.08.07;	author tgl;	state Exp;
branches;
next	;


desc
@@


1.14
log
@Fix contrib/xml2 so regression test still works when it's built without libxslt.

This involves modifying the module to have a stable ABI, that is, the
xslt_process() function still exists even without libxslt.  It throws a
runtime error if called, but doesn't prevent executing the CREATE FUNCTION
call.  This is a good thing anyway to simplify cross-version upgrades.
@
text
@# $PostgreSQL: pgsql/contrib/xml2/Makefile,v 1.13 2010/02/28 21:31:57 tgl Exp $

MODULE_big = pgxml

OBJS = xpath.o xslt_proc.o

SHLIB_LINK += $(filter -lxslt, $(LIBS)) $(filter -lxml2, $(LIBS))

DATA_built = pgxml.sql
DATA = uninstall_pgxml.sql
REGRESS = xml2

ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
subdir = contrib/xml2
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif
@


1.13
log
@Fix up memory management problems in contrib/xml2.

Get rid of the code that attempted to funnel libxml2's memory allocations
into palloc.   We already knew from experience with the core xml datatype
that trying to do this is simply not reliable.  Unlike the core code, I
did not bother adding a lot of PG_TRY/PG_CATCH logic to try to ensure that
everything is cleaned up on error exit.  Hence, we might leak some memory
if one of these functions fails partway through.  Given the deprecated
status of this contrib module and the fact that errors partway through
the functions shouldn't be too common, it doesn't seem worth worrying about.

Also fix a separate bug in xpath_table, that it did the wrong things
if given a result tuple descriptor with less than 2 columns.  While
such a case isn't very useful in practice, we shouldn't fail or stomp
memory when it occurs.

Add some simple regression tests based on all the reported crash cases
that I have on hand.

This should be back-patched, but let's see if the buildfarm likes it first.
@
text
@d1 1
a1 1
# $PostgreSQL: pgsql/contrib/xml2/Makefile,v 1.12 2008/05/08 16:49:37 tgl Exp $
d5 1
a5 1
OBJS = $(if $(filter -lxslt, $(LIBS)), xpath.o xslt_proc.o, xpath.o)
@


1.12
log
@Fix contrib/xml2 makefile to not override CFLAGS, and in passing make it
auto-configure properly for libxslt present or not.
@
text
@d1 1
a1 1
# $PostgreSQL: pgsql/contrib/xml2/Makefile,v 1.11 2007/11/10 23:59:52 momjian Exp $
d11 1
@


1.12.2.1
log
@Back-patch today's memory management fixups in contrib/xml2.

Prior to 8.3, these changes are not critical for compatibility with core
Postgres, since core had no libxml2 calls then.  However there is still
a risk if contrib/xml2 is used along with libxml2 functionality in Perl
or other loadable modules.  So back-patch to all versions.

Also back-patch addition of regression tests.  I'm not sure how many of
the cases are interesting without the interaction with core xml code,
but a silly regression test is still better than none at all.
@
text
@d1 1
a1 1
# $PostgreSQL: pgsql/contrib/xml2/Makefile,v 1.12 2008/05/08 16:49:37 tgl Exp $
a10 1
REGRESS = xml2
@


1.12.2.2
log
@Fix contrib/xml2 so regression test still works when it's built without libxslt.

This involves modifying the module to have a stable ABI, that is, the
xslt_process() function still exists even without libxslt.  It throws a
runtime error if called, but doesn't prevent executing the CREATE FUNCTION
call.  This is a good thing anyway to simplify cross-version upgrades.
@
text
@d1 1
a1 1
# $PostgreSQL: pgsql/contrib/xml2/Makefile,v 1.12.2.1 2010/03/01 03:41:04 tgl Exp $
d5 1
a5 1
OBJS = xpath.o xslt_proc.o
@


1.11
log
@Remove references to READMEs from /contrib Makefiles.
@
text
@d1 1
a1 1
# $PostgreSQL: pgsql/contrib/xml2/Makefile,v 1.10 2007/06/26 22:05:04 tgl Exp $
d5 1
a5 2
# Remove xslt_proc.o from the following line if you don't have libxslt
OBJS = xpath.o xslt_proc.o
d7 1
a7 2
# Remove -lxslt from the following line if you don't have libxslt.
SHLIB_LINK = -lxslt -lxml2
a11 2
override CFLAGS += $(shell xml2-config --cflags)

@


1.11.2.1
log
@Fix contrib/xml2 makefile to not override CFLAGS, and in passing make it
auto-configure properly for libxslt present or not.
@
text
@d1 1
a1 1
# $PostgreSQL: pgsql/contrib/xml2/Makefile,v 1.11 2007/11/10 23:59:52 momjian Exp $
d5 2
a6 1
OBJS = $(if $(filter -lxslt, $(LIBS)), xpath.o xslt_proc.o, xpath.o)
d8 2
a9 1
SHLIB_LINK += $(filter -lxslt, $(LIBS)) $(filter -lxml2, $(LIBS))
d14 2
@


1.11.2.2
log
@Back-patch today's memory management fixups in contrib/xml2.

Prior to 8.3, these changes are not critical for compatibility with core
Postgres, since core had no libxml2 calls then.  However there is still
a risk if contrib/xml2 is used along with libxml2 functionality in Perl
or other loadable modules.  So back-patch to all versions.

Also back-patch addition of regression tests.  I'm not sure how many of
the cases are interesting without the interaction with core xml code,
but a silly regression test is still better than none at all.
@
text
@d1 1
a1 1
# $PostgreSQL: pgsql/contrib/xml2/Makefile,v 1.11.2.1 2008/05/08 16:49:47 tgl Exp $
a10 1
REGRESS = xml2
@


1.11.2.3
log
@Fix contrib/xml2 so regression test still works when it's built without libxslt.

This involves modifying the module to have a stable ABI, that is, the
xslt_process() function still exists even without libxslt.  It throws a
runtime error if called, but doesn't prevent executing the CREATE FUNCTION
call.  This is a good thing anyway to simplify cross-version upgrades.
@
text
@d1 1
a1 1
# $PostgreSQL: pgsql/contrib/xml2/Makefile,v 1.11.2.2 2010/03/01 03:41:11 tgl Exp $
d5 1
a5 1
OBJS = xpath.o xslt_proc.o
@


1.10
log
@Fix PGXS conventions so that extensions can be built against Postgres
installations whose pg_config program does not appear first in the PATH.
Per gripe from Eddie Stanley and subsequent discussions with Fabien Coelho
and others.
@
text
@d1 1
a1 1
# $PostgreSQL: pgsql/contrib/xml2/Makefile,v 1.9 2007/02/09 17:04:00 petere Exp $
a12 1
DOCS = README.xml2
@


1.9
log
@Add $PostgreSQL$ marker to contrib makefiles.
@
text
@d1 1
a1 1
# $PostgreSQL$
d18 2
a19 1
PGXS := $(shell pg_config --pgxs)
@


1.8
log
@Fix order of linking of libxslt and libxml2, per Dave Page.
@
text
@d1 1
a1 1
# This makefile will build the new XML and XSLT routines.
a25 1

@


1.8.2.1
log
@Fix contrib/xml2 makefile to not override CFLAGS.
@
text
@d15 1
a15 1
PG_CPPFLAGS := $(shell xml2-config --cflags)
@


1.8.2.2
log
@Back-patch today's memory management fixups in contrib/xml2.

Prior to 8.3, these changes are not critical for compatibility with core
Postgres, since core had no libxml2 calls then.  However there is still
a risk if contrib/xml2 is used along with libxml2 functionality in Perl
or other loadable modules.  So back-patch to all versions.

Also back-patch addition of regression tests.  I'm not sure how many of
the cases are interesting without the interaction with core xml code,
but a silly regression test is still better than none at all.
@
text
@a12 1
REGRESS = xml2
@


1.8.2.3
log
@Fix contrib/xml2 so regression test still works when it's built without libxslt.

This involves modifying the module to have a stable ABI, that is, the
xslt_process() function still exists even without libxslt.  It throws a
runtime error if called, but doesn't prevent executing the CREATE FUNCTION
call.  This is a good thing anyway to simplify cross-version upgrades.
@
text
@a2 5
# This module will not work without libxml2, but it will work without libxslt.
# To build without libxslt, run "gmake USE_LIBXSLT=0", or comment out the
# following line:
USE_LIBXSLT = 1

d5 1
d8 1
a8 4
PG_CPPFLAGS := $(shell xml2-config --cflags)

ifeq ($(USE_LIBXSLT),1)
PG_CPPFLAGS += -DUSE_LIBXSLT
a9 3
else
SHLIB_LINK = -lxml2
endif
d16 2
d27 1
@


1.7
log
@contrib uninstall scripts

by David Fetter
@
text
@d9 1
a9 1
SHLIB_LINK = -lxml2 -lxslt
@


1.6
log
@PGXS should be set with := not =, as specified in the documentation,
to avoid useless multiple executions of pg_config.
@
text
@d12 1
@


1.6.2.1
log
@Fix order of linking of libxslt and libxml2, per Dave Page.
@
text
@d9 1
a9 1
SHLIB_LINK = -lxslt -lxml2
@


1.6.2.2
log
@Fix contrib/xml2 makefile to not override CFLAGS.
@
text
@d14 1
a14 1
PG_CPPFLAGS := $(shell xml2-config --cflags)
@


1.6.2.3
log
@Back-patch today's memory management fixups in contrib/xml2.

Prior to 8.3, these changes are not critical for compatibility with core
Postgres, since core had no libxml2 calls then.  However there is still
a risk if contrib/xml2 is used along with libxml2 functionality in Perl
or other loadable modules.  So back-patch to all versions.

Also back-patch addition of regression tests.  I'm not sure how many of
the cases are interesting without the interaction with core xml code,
but a silly regression test is still better than none at all.
@
text
@a11 1
REGRESS = xml2
@


1.6.2.4
log
@Fix contrib/xml2 so regression test still works when it's built without libxslt.

This involves modifying the module to have a stable ABI, that is, the
xslt_process() function still exists even without libxslt.  It throws a
runtime error if called, but doesn't prevent executing the CREATE FUNCTION
call.  This is a good thing anyway to simplify cross-version upgrades.
@
text
@a2 5
# This module will not work without libxml2, but it will work without libxslt.
# To build without libxslt, run "gmake USE_LIBXSLT=0", or comment out the
# following line:
USE_LIBXSLT = 1

d5 1
d8 1
a8 4
PG_CPPFLAGS := $(shell xml2-config --cflags)

ifeq ($(USE_LIBXSLT),1)
PG_CPPFLAGS += -DUSE_LIBXSLT
a9 3
else
SHLIB_LINK = -lxml2
endif
d15 2
d26 1
@


1.5
log
@Contrib build fixes:

- add some additional files to the dbmirror install (approved by
ssinger)

- add a makefile for contrib/mysql, and add mysql to the list of
contribs build by default

- use xml2-config to pickup -I flags for libxml2 in contrib/xml and
contrib/xml2

Original work from Martin Pitt of Debian, minor cleanups by Neil
Conway.
@
text
@d17 1
a17 1
PGXS = $(shell pg_config --pgxs)
@


1.5.4.1
log
@Fix order of linking of libxslt and libxml2, per Dave Page.
@
text
@d9 1
a9 1
SHLIB_LINK = -lxslt -lxml2
@


1.5.4.2
log
@Fix contrib/xml2 makefile to not override CFLAGS.
@
text
@d14 1
a14 1
PG_CPPFLAGS := $(shell xml2-config --cflags)
@


1.5.4.3
log
@Back-patch today's memory management fixups in contrib/xml2.

Prior to 8.3, these changes are not critical for compatibility with core
Postgres, since core had no libxml2 calls then.  However there is still
a risk if contrib/xml2 is used along with libxml2 functionality in Perl
or other loadable modules.  So back-patch to all versions.

Also back-patch addition of regression tests.  I'm not sure how many of
the cases are interesting without the interaction with core xml code,
but a silly regression test is still better than none at all.
@
text
@a11 1
REGRESS = xml2
@


1.5.4.4
log
@Fix contrib/xml2 so regression test still works when it's built without libxslt.

This involves modifying the module to have a stable ABI, that is, the
xslt_process() function still exists even without libxslt.  It throws a
runtime error if called, but doesn't prevent executing the CREATE FUNCTION
call.  This is a good thing anyway to simplify cross-version upgrades.
@
text
@a2 5
# This module will not work without libxml2, but it will work without libxslt.
# To build without libxslt, run "gmake USE_LIBXSLT=0", or comment out the
# following line:
USE_LIBXSLT = 1

d5 1
d8 1
a8 4
PG_CPPFLAGS := $(shell xml2-config --cflags)

ifeq ($(USE_LIBXSLT),1)
PG_CPPFLAGS += -DUSE_LIBXSLT
a9 3
else
SHLIB_LINK = -lxml2
endif
d15 2
d26 1
@


1.4
log
@> Please find enclose a submission to fix these problems.
>
> The patch adds missing the "libpgport.a" file to the installation under
> "install-all-headers". It is needed by some contribs. I install the
> library in "pkglibdir", but I was wondering whether it should be "libdir"?
> I was wondering also whether it would make sense to have a "libpgport.so"?
>
> It fixes various macros which are used by contrib makefiles, especially
> libpq_*dir and LDFLAGS when used under PGXS. It seems to me that they are
> needed to
>
> It adds the ability to test and use PGXS with contribs, with "make
> USE_PGXS=1". Without the macro, this is exactly as before, there should be
> no difference, esp. wrt the vpath feature that seemed broken by previous
> submission. So it should not harm anybody, and it is useful at least to me.
>
> It fixes some inconsistencies in various contrib makefiles
> (useless override, ":=" instead of "=").

Fabien COELHO
@
text
@d14 1
@


1.3
log
@Rename README's to match directory names.  Mention copyright matches
PostgreSQL's.
@
text
@a1 3
subdir = contrib/xml2
top_builddir = ../../
include $(top_builddir)/src/Makefile.global
d14 10
a23 1
include $(top_builddir)contrib/contrib-global.mk
@


1.2
log
@Have makefile reference /xml2.
@
text
@d15 1
a15 1
DOCS = README.pgxml
@


1.1
log
@Move new version of contrib/ xml into xml2, keep old version in /xml.
@
text
@d2 1
a2 1
subdir = contrib/xml
@

