Thread: [PATCH] Remove useless USE_PGXS support in contrib
This has served no purpose except to 1. take up space 2. confuse users 3. produce broken external extension modules that take contrib as an example 4. break builds of PostgreSQL when users try to fix 3. by exporting USE_PGXS There is adequate material in the documentation and elsewhere (PGXN) on how to write extensions and their makefiles, so this is not needed. --- pursuant to discussion here: http://www.postgresql.org/message-id/512CEAB8.9010400@gmx.net contrib/adminpack/Makefile | 6 ------contrib/auth_delay/Makefile | 6 ------contrib/auto_explain/Makefile | 6 ------contrib/btree_gin/Makefile | 6 ------contrib/btree_gist/Makefile | 6 ------contrib/chkpass/Makefile | 6 ------contrib/citext/Makefile | 6 ------contrib/cube/Makefile | 6 ------contrib/dblink/Makefile | 6 ------contrib/dict_int/Makefile | 6 ------contrib/dict_xsyn/Makefile | 6 ------contrib/dummy_seclabel/Makefile | 6 ------contrib/earthdistance/Makefile | 6 ------contrib/file_fdw/Makefile | 6 ------contrib/fuzzystrmatch/Makefile | 6 ------contrib/hstore/Makefile | 6 ------contrib/intagg/Makefile | 6 ------contrib/intarray/Makefile | 6 ------contrib/isn/Makefile | 6 ------contrib/lo/Makefile | 6 ------contrib/ltree/Makefile | 6 ------contrib/oid2name/Makefile | 6 ------contrib/pageinspect/Makefile | 6 ------contrib/passwordcheck/Makefile | 6 ------contrib/pg_archivecleanup/Makefile | 6 ------contrib/pg_buffercache/Makefile | 6 ------contrib/pg_freespacemap/Makefile | 6 ------contrib/pg_standby/Makefile | 6 ------contrib/pg_stat_statements/Makefile| 6 ------contrib/pg_test_fsync/Makefile | 6 ------contrib/pg_test_timing/Makefile | 6 ------contrib/pg_trgm/Makefile | 6 ------contrib/pg_upgrade/Makefile | 6 ------contrib/pg_upgrade_support/Makefile | 8 +-------contrib/pg_xlogdump/Makefile | 6 ------contrib/pgbench/Makefile | 6 ------contrib/pgcrypto/Makefile | 6 ------contrib/pgrowlocks/Makefile | 6 ------contrib/pgstattuple/Makefile | 6 ------contrib/postgres_fdw/Makefile | 6 ------contrib/seg/Makefile | 6 ------contrib/sepgsql/Makefile | 6 ------contrib/spi/Makefile | 6 ------contrib/sslinfo/Makefile | 6 ------contrib/tablefunc/Makefile | 6 ------contrib/tcn/Makefile | 6 ------contrib/test_parser/Makefile | 6 ------contrib/tsearch2/Makefile | 6 ------contrib/unaccent/Makefile | 6 ------contrib/uuid-ossp/Makefile | 6 ------contrib/vacuumlo/Makefile | 6 ------contrib/worker_spi/Makefile | 6 ------contrib/xml2/Makefile | 6 ------53 files changed, 1 insertion(+), 319 deletions(-) diff --git a/contrib/adminpack/Makefile b/contrib/adminpack/Makefile index 5cbc8f0..074d443 100644 --- a/contrib/adminpack/Makefile +++ b/contrib/adminpack/Makefile @@ -7,13 +7,7 @@ PG_CPPFLAGS = -I$(libpq_srcdir)EXTENSION = adminpackDATA = adminpack--1.0.sql -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/adminpacktop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/auth_delay/Makefile b/contrib/auth_delay/Makefile index 09d2d54..d1c7918 100644 --- a/contrib/auth_delay/Makefile +++ b/contrib/auth_delay/Makefile @@ -2,13 +2,7 @@MODULES = auth_delay -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/auth_delaytop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/auto_explain/Makefile b/contrib/auto_explain/Makefile index 2d1443f..d343572 100644 --- a/contrib/auto_explain/Makefile +++ b/contrib/auto_explain/Makefile @@ -3,13 +3,7 @@MODULE_big = auto_explainOBJS = auto_explain.o -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/auto_explaintop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/btree_gin/Makefile b/contrib/btree_gin/Makefile index 09fd3e6..284b745 100644 --- a/contrib/btree_gin/Makefile +++ b/contrib/btree_gin/Makefile @@ -11,13 +11,7 @@ REGRESS = install_btree_gin int2 int4 int8 float4 float8 money oid \ macaddr inet cidr text varcharchar bytea bit varbit \ numeric -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/btree_gintop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/btree_gist/Makefile b/contrib/btree_gist/Makefile index ba4af14..0d1dee3 100644 --- a/contrib/btree_gist/Makefile +++ b/contrib/btree_gist/Makefile @@ -17,13 +17,7 @@ REGRESS = init int2 int4 int8 float4 float8 cash oid timestamp timestamptz \SHLIB_LINK += $(filter -lm,$(LIBS)) -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/btree_gisttop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/chkpass/Makefile b/contrib/chkpass/Makefile index b775aef..5175371 100644 --- a/contrib/chkpass/Makefile +++ b/contrib/chkpass/Makefile @@ -8,13 +8,7 @@ DATA = chkpass--1.0.sql chkpass--unpackaged--1.0.sqlSHLIB_LINK = $(filter -lcrypt, $(LIBS)) -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/chkpasstop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/citext/Makefile b/contrib/citext/Makefile index 6594252..18e0f0f 100644 --- a/contrib/citext/Makefile +++ b/contrib/citext/Makefile @@ -7,13 +7,7 @@ DATA = citext--1.0.sql citext--unpackaged--1.0.sqlREGRESS = citext -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/citexttop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/cube/Makefile b/contrib/cube/Makefile index b5cd5d0..635d707 100644 --- a/contrib/cube/Makefile +++ b/contrib/cube/Makefile @@ -12,16 +12,10 @@ EXTRA_CLEAN = y.tab.c y.tab.hSHLIB_LINK += $(filter -lm, $(LIBS)) -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/cubetop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif # cubescan is compiled as part of cubeparse diff --git a/contrib/dblink/Makefile b/contrib/dblink/Makefile index 32314a0..f7b4acf 100644 --- a/contrib/dblink/Makefile +++ b/contrib/dblink/Makefile @@ -14,13 +14,7 @@ REGRESS = dblink# the db name is hard-coded in the testsoverride USE_MODULE_DB = -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/dblinktop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/dict_int/Makefile b/contrib/dict_int/Makefile index 3a3fc36..0a8b511 100644 --- a/contrib/dict_int/Makefile +++ b/contrib/dict_int/Makefile @@ -8,13 +8,7 @@ DATA = dict_int--1.0.sql dict_int--unpackaged--1.0.sqlREGRESS = dict_int -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/dict_inttop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/dict_xsyn/Makefile b/contrib/dict_xsyn/Makefile index ce92baa..e7f6286 100644 --- a/contrib/dict_xsyn/Makefile +++ b/contrib/dict_xsyn/Makefile @@ -9,13 +9,7 @@ DATA_TSEARCH = xsyn_sample.rulesREGRESS = dict_xsyn -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/dict_xsyntop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/dummy_seclabel/Makefile b/contrib/dummy_seclabel/Makefile index 105400f..9c3d3ea 100644 --- a/contrib/dummy_seclabel/Makefile +++ b/contrib/dummy_seclabel/Makefile @@ -2,13 +2,7 @@MODULES = dummy_seclabel -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/dummy_seclabeltop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/earthdistance/Makefile b/contrib/earthdistance/Makefile index 48a7cf8..d60ed86 100644 --- a/contrib/earthdistance/Makefile +++ b/contrib/earthdistance/Makefile @@ -10,13 +10,7 @@ REGRESS_OPTS = --extra-install=contrib/cubeLDFLAGS_SL += $(filter -lm, $(LIBS)) -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/earthdistancetop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/file_fdw/Makefile b/contrib/file_fdw/Makefile index 4616cec..8c03df4 100644 --- a/contrib/file_fdw/Makefile +++ b/contrib/file_fdw/Makefile @@ -9,13 +9,7 @@ REGRESS = file_fdwEXTRA_CLEAN = sql/file_fdw.sql expected/file_fdw.out -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/file_fdwtop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/fuzzystrmatch/Makefile b/contrib/fuzzystrmatch/Makefile index 834b679..6e51455 100644 --- a/contrib/fuzzystrmatch/Makefile +++ b/contrib/fuzzystrmatch/Makefile @@ -6,16 +6,10 @@ OBJS = fuzzystrmatch.o dmetaphone.oEXTENSION = fuzzystrmatchDATA = fuzzystrmatch--1.0.sql fuzzystrmatch--unpackaged--1.0.sql -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/fuzzystrmatchtop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif# levenshtein.c is #included by fuzzystrmatch.cfuzzystrmatch.o: fuzzystrmatch.c levenshtein.c diff --git a/contrib/hstore/Makefile b/contrib/hstore/Makefile index 1236e79..3e258e7 100644 --- a/contrib/hstore/Makefile +++ b/contrib/hstore/Makefile @@ -9,13 +9,7 @@ DATA = hstore--1.1.sql hstore--1.0--1.1.sql hstore--unpackaged--1.0.sqlREGRESS = hstore -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/hstoretop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/intagg/Makefile b/contrib/intagg/Makefile index 2cfe997..8e52b41 100644 --- a/contrib/intagg/Makefile +++ b/contrib/intagg/Makefile @@ -3,13 +3,7 @@EXTENSION = intaggDATA = intagg--1.0.sql intagg--unpackaged--1.0.sql -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/intaggtop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/intarray/Makefile b/contrib/intarray/Makefile index 71f820e..4107dc6 100644 --- a/contrib/intarray/Makefile +++ b/contrib/intarray/Makefile @@ -8,13 +8,7 @@ DATA = intarray--1.0.sql intarray--unpackaged--1.0.sqlREGRESS = _int -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/intarraytop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/isn/Makefile b/contrib/isn/Makefile index bd8f193..1f8e189 100644 --- a/contrib/isn/Makefile +++ b/contrib/isn/Makefile @@ -5,13 +5,7 @@ MODULES = isnEXTENSION = isnDATA = isn--1.0.sql isn--unpackaged--1.0.sql -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/isntop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/lo/Makefile b/contrib/lo/Makefile index 66b337c..fa7dfe9 100644 --- a/contrib/lo/Makefile +++ b/contrib/lo/Makefile @@ -5,13 +5,7 @@ MODULES = loEXTENSION = loDATA = lo--1.0.sql lo--unpackaged--1.0.sql -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/lotop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/ltree/Makefile b/contrib/ltree/Makefile index 65d42f8..4c4fd3f 100644 --- a/contrib/ltree/Makefile +++ b/contrib/ltree/Makefile @@ -10,13 +10,7 @@ DATA = ltree--1.0.sql ltree--unpackaged--1.0.sqlREGRESS = ltree -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/ltreetop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/oid2name/Makefile b/contrib/oid2name/Makefile index f695b4a..10f4f58 100644 --- a/contrib/oid2name/Makefile +++ b/contrib/oid2name/Makefile @@ -9,13 +9,7 @@ OBJS = oid2name.oPG_CPPFLAGS = -I$(libpq_srcdir)PG_LIBS = $(libpq_pgport) -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/oid2nametop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/pageinspect/Makefile b/contrib/pageinspect/Makefile index 0e267eb..ec0b279 100644 --- a/contrib/pageinspect/Makefile +++ b/contrib/pageinspect/Makefile @@ -7,13 +7,7 @@ EXTENSION = pageinspectDATA = pageinspect--1.1.sql pageinspect--1.0--1.1.sql \ pageinspect--unpackaged--1.0.sql -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/pageinspecttop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/passwordcheck/Makefile b/contrib/passwordcheck/Makefile index 4829bfd..0e2338c 100644 --- a/contrib/passwordcheck/Makefile +++ b/contrib/passwordcheck/Makefile @@ -7,13 +7,7 @@ OBJS = passwordcheck.o# PG_CPPFLAGS = -DUSE_CRACKLIB '-DCRACKLIB_DICTPATH="/usr/lib/cracklib_dict"'# SHLIB_LINK= -lcrack -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/passwordchecktop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/pg_archivecleanup/Makefile b/contrib/pg_archivecleanup/Makefile index 39c55d8..e746023 100644 --- a/contrib/pg_archivecleanup/Makefile +++ b/contrib/pg_archivecleanup/Makefile @@ -6,13 +6,7 @@ PGAPPICON = win32PROGRAM = pg_archivecleanupOBJS = pg_archivecleanup.o -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/pg_archivecleanuptop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/pg_buffercache/Makefile b/contrib/pg_buffercache/Makefile index 323c0ac..06d2c30 100644 --- a/contrib/pg_buffercache/Makefile +++ b/contrib/pg_buffercache/Makefile @@ -6,13 +6,7 @@ OBJS = pg_buffercache_pages.oEXTENSION = pg_buffercacheDATA = pg_buffercache--1.0.sql pg_buffercache--unpackaged--1.0.sql -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/pg_buffercachetop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/pg_freespacemap/Makefile b/contrib/pg_freespacemap/Makefile index b2e3ba3..f028c05 100644 --- a/contrib/pg_freespacemap/Makefile +++ b/contrib/pg_freespacemap/Makefile @@ -6,13 +6,7 @@ OBJS = pg_freespacemap.oEXTENSION = pg_freespacemapDATA = pg_freespacemap--1.0.sql pg_freespacemap--unpackaged--1.0.sql -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/pg_freespacemaptop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/pg_standby/Makefile b/contrib/pg_standby/Makefile index b7c6ae9..493624a 100644 --- a/contrib/pg_standby/Makefile +++ b/contrib/pg_standby/Makefile @@ -6,13 +6,7 @@ PGAPPICON = win32PROGRAM = pg_standbyOBJS = pg_standby.o -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/pg_standbytop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/pg_stat_statements/Makefile b/contrib/pg_stat_statements/Makefile index e8aed61..ad717b5 100644 --- a/contrib/pg_stat_statements/Makefile +++ b/contrib/pg_stat_statements/Makefile @@ -7,13 +7,7 @@ EXTENSION = pg_stat_statementsDATA = pg_stat_statements--1.1.sql pg_stat_statements--1.0--1.1.sql \ pg_stat_statements--unpackaged--1.0.sql -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/pg_stat_statementstop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/pg_test_fsync/Makefile b/contrib/pg_test_fsync/Makefile index b456429..2cb05a5 100644 --- a/contrib/pg_test_fsync/Makefile +++ b/contrib/pg_test_fsync/Makefile @@ -6,13 +6,7 @@ PGAPPICON = win32PROGRAM = pg_test_fsyncOBJS = pg_test_fsync.o -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/pg_test_fsynctop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/pg_test_timing/Makefile b/contrib/pg_test_timing/Makefile index b8b266a..83c99c0 100644 --- a/contrib/pg_test_timing/Makefile +++ b/contrib/pg_test_timing/Makefile @@ -6,13 +6,7 @@ PGAPPICON = win32PROGRAM = pg_test_timingOBJS = pg_test_timing.o -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/pg_test_timingtop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/pg_trgm/Makefile b/contrib/pg_trgm/Makefile index 0d549f8..0b0ee44 100644 --- a/contrib/pg_trgm/Makefile +++ b/contrib/pg_trgm/Makefile @@ -8,13 +8,7 @@ DATA = pg_trgm--1.1.sql pg_trgm--1.0--1.1.sql pg_trgm--unpackaged--1.0.sqlREGRESS = pg_trgm -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/pg_trgmtop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/pg_upgrade/Makefile b/contrib/pg_upgrade/Makefile index bbb14a1..41612a3 100644 --- a/contrib/pg_upgrade/Makefile +++ b/contrib/pg_upgrade/Makefile @@ -13,16 +13,10 @@ PG_LIBS = $(libpq_pgport)EXTRA_CLEAN = analyze_new_cluster.sh delete_old_cluster.sh log/ tmp_check/ -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/pg_upgradetop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endifcheck: test.sh all MAKE=$(MAKE) bindir=$(bindir) libdir=$(libdir) $(SHELL) $< --install diff --git a/contrib/pg_upgrade_support/Makefile b/contrib/pg_upgrade_support/Makefile index f7def16..4214585 100644 --- a/contrib/pg_upgrade_support/Makefile +++ b/contrib/pg_upgrade_support/Makefile @@ -1,16 +1,10 @@# contrib/pg_upgrade_support/Makefile -PGFILEDESC = "pg_upgrade_support - server-side functions for pg_upgrade" +###PGFILEDESC = "pg_upgrade_support - server-side functions for pg_upgrade"MODULES = pg_upgrade_support -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/pg_upgrade_supporttop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/pg_xlogdump/Makefile b/contrib/pg_xlogdump/Makefile index 22bd8dc..23fb8f7 100644 --- a/contrib/pg_xlogdump/Makefile +++ b/contrib/pg_xlogdump/Makefile @@ -12,16 +12,10 @@ RMGRDESCOBJS = $(patsubst %.c,%.o,$(RMGRDESCSOURCES))EXTRA_CLEAN = $(RMGRDESCSOURCES) xlogreader.c -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/pg_xlogdumptop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endifoverride CPPFLAGS := -DFRONTEND $(CPPFLAGS) diff --git a/contrib/pgbench/Makefile b/contrib/pgbench/Makefile index b8f5fb4..98646ee 100644 --- a/contrib/pgbench/Makefile +++ b/contrib/pgbench/Makefile @@ -9,16 +9,10 @@ OBJS = pgbench.oPG_CPPFLAGS = -I$(libpq_srcdir)PG_LIBS = $(libpq_pgport) $(PTHREAD_LIBS) -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/pgbenchtop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endififneq ($(PORTNAME), win32)override CFLAGS += $(PTHREAD_CFLAGS) diff --git a/contrib/pgcrypto/Makefile b/contrib/pgcrypto/Makefile index dadec95..17c620d 100644 --- a/contrib/pgcrypto/Makefile +++ b/contrib/pgcrypto/Makefile @@ -36,16 +36,10 @@ REGRESS = init md5 sha1 hmac-md5 hmac-sha1 blowfish rijndael \EXTRA_CLEAN = gen-rtab -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/pgcryptotop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif# Add libraries that pgcrypto depends (or might depend) on into the# shared library link. (The order in which youlist them here doesn't diff --git a/contrib/pgrowlocks/Makefile b/contrib/pgrowlocks/Makefile index fe80423..4640403 100644 --- a/contrib/pgrowlocks/Makefile +++ b/contrib/pgrowlocks/Makefile @@ -6,13 +6,7 @@ OBJS = pgrowlocks.oEXTENSION = pgrowlocksDATA = pgrowlocks--1.1.sql pgrowlocks--1.0--1.1.sql pgrowlocks--unpackaged--1.0.sql -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/pgrowlockstop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/pgstattuple/Makefile b/contrib/pgstattuple/Makefile index fc893d8..d9f7802 100644 --- a/contrib/pgstattuple/Makefile +++ b/contrib/pgstattuple/Makefile @@ -8,13 +8,7 @@ DATA = pgstattuple--1.1.sql pgstattuple--1.0--1.1.sql pgstattuple--unpackaged--1REGRESS = pgstattuple -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/pgstattupletop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/postgres_fdw/Makefile b/contrib/postgres_fdw/Makefile index 8c49720..b584a91 100644 --- a/contrib/postgres_fdw/Makefile +++ b/contrib/postgres_fdw/Makefile @@ -15,13 +15,7 @@ REGRESS = postgres_fdw# the db name is hard-coded in the testsoverride USE_MODULE_DB = -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/postgres_fdwtop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/seg/Makefile b/contrib/seg/Makefile index fb9c576..e37ae29 100644 --- a/contrib/seg/Makefile +++ b/contrib/seg/Makefile @@ -10,16 +10,10 @@ REGRESS = segEXTRA_CLEAN = y.tab.c y.tab.h -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/segtop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif # segscan is compiled as part of segparse diff --git a/contrib/sepgsql/Makefile b/contrib/sepgsql/Makefile index ff3a61d..d3aa3dd 100644 --- a/contrib/sepgsql/Makefile +++ b/contrib/sepgsql/Makefile @@ -9,15 +9,9 @@ DATA_built = sepgsql.sql# we have to clean those result files explicitlyEXTRA_CLEAN = -r $(pg_regress_clean_files)tmp/ *.pp sepgsql-regtest.if sepgsql-regtest.fc -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/sepgsqltop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endifSHLIB_LINK += -lselinux diff --git a/contrib/spi/Makefile b/contrib/spi/Makefile index 0c11bfc..2af5c01 100644 --- a/contrib/spi/Makefile +++ b/contrib/spi/Makefile @@ -18,13 +18,7 @@ PG_CPPFLAGS = -DREFINT_VERBOSELDFLAGS_SL += -L$(top_builddir)/src/port -lpgport -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/spitop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/sslinfo/Makefile b/contrib/sslinfo/Makefile index 0dee6ed..5708660 100644 --- a/contrib/sslinfo/Makefile +++ b/contrib/sslinfo/Makefile @@ -6,15 +6,9 @@ OBJS = sslinfo.oEXTENSION = sslinfoDATA = sslinfo--1.0.sql sslinfo--unpackaged--1.0.sql -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/sslinfotop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endifSHLIB_LINK += $(filter -lssl -lcrypto -lssleay32 -leay32, $(LIBS)) diff --git a/contrib/tablefunc/Makefile b/contrib/tablefunc/Makefile index eb10893..695a7f3 100644 --- a/contrib/tablefunc/Makefile +++ b/contrib/tablefunc/Makefile @@ -9,13 +9,7 @@ REGRESS = tablefuncLDFLAGS_SL += $(filter -lm, $(LIBS)) -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/tablefunctop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/tcn/Makefile b/contrib/tcn/Makefile index 7bac5e3..e4ea2a6 100644 --- a/contrib/tcn/Makefile +++ b/contrib/tcn/Makefile @@ -5,13 +5,7 @@ MODULES = tcnEXTENSION = tcnDATA = tcn--1.0.sql -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/tcntop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/test_parser/Makefile b/contrib/test_parser/Makefile index b9766cb..67711f5 100644 --- a/contrib/test_parser/Makefile +++ b/contrib/test_parser/Makefile @@ -8,13 +8,7 @@ DATA = test_parser--1.0.sql test_parser--unpackaged--1.0.sqlREGRESS = test_parser -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/test_parsertop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/tsearch2/Makefile b/contrib/tsearch2/Makefile index d260fd0..a065f0f 100644 --- a/contrib/tsearch2/Makefile +++ b/contrib/tsearch2/Makefile @@ -7,13 +7,7 @@ DATA = tsearch2--1.0.sql tsearch2--unpackaged--1.0.sqlREGRESS = tsearch2 -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/tsearch2top_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/unaccent/Makefile b/contrib/unaccent/Makefile index f0be62d..53f33db 100644 --- a/contrib/unaccent/Makefile +++ b/contrib/unaccent/Makefile @@ -13,13 +13,7 @@ REGRESS = unaccentENCODING = UTF8NO_LOCALE = 1 -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/unaccenttop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/uuid-ossp/Makefile b/contrib/uuid-ossp/Makefile index 9b2d2e3..44af514 100644 --- a/contrib/uuid-ossp/Makefile +++ b/contrib/uuid-ossp/Makefile @@ -8,13 +8,7 @@ DATA = uuid-ossp--1.0.sql uuid-ossp--unpackaged--1.0.sqlSHLIB_LINK += $(OSSP_UUID_LIBS) -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/uuid-ossptop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/vacuumlo/Makefile b/contrib/vacuumlo/Makefile index b658f9b..bc257ae 100644 --- a/contrib/vacuumlo/Makefile +++ b/contrib/vacuumlo/Makefile @@ -9,13 +9,7 @@ OBJS = vacuumlo.oPG_CPPFLAGS = -I$(libpq_srcdir)PG_LIBS = $(libpq_pgport) -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/vacuumlotop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/worker_spi/Makefile b/contrib/worker_spi/Makefile index edf4105..ea9e2c7 100644 --- a/contrib/worker_spi/Makefile +++ b/contrib/worker_spi/Makefile @@ -2,13 +2,7 @@MODULES = worker_spi -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/worker_spitop_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/contrib/xml2/Makefile b/contrib/xml2/Makefile index be3d018..2b97c35 100644 --- a/contrib/xml2/Makefile +++ b/contrib/xml2/Makefile @@ -10,13 +10,7 @@ REGRESS = xml2SHLIB_LINK += $(filter -lxslt, $(LIBS)) -lxml2 -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -elsesubdir = contrib/xml2top_builddir = ../..include $(top_builddir)/src/Makefile.globalinclude $(top_srcdir)/contrib/contrib-global.mk -endif -- 1.7.10.4
On Jun 12, 2013, at 8:16 PM, Peter Eisentraut <peter_e@gmx.net> wrote: > This has served no purpose except to > > 1. take up space > 2. confuse users > 3. produce broken external extension modules that take contrib as an example > 4. break builds of PostgreSQL when users try to fix 3. by exporting USE_PGXS > > There is adequate material in the documentation and elsewhere (PGXN) on > how to write extensions and their makefiles, so this is not needed. +1 Nice. David
----- Original Message ----- > From: Peter Eisentraut <peter_e@gmx.net> > To: pgsql-hackers@postgresql.org > Cc: > Sent: Thursday, 13 June 2013 12:16 PM > Subject: [HACKERS] [PATCH] Remove useless USE_PGXS support in contrib > >T his has served no purpose except to > > 1. take up space > 2. confuse users > 3. produce broken external extension modules that take contrib as an example > 4. break builds of PostgreSQL when users try to fix 3. by exporting USE_PGXS Agree, only if we consider these contrib module is always gonna deployed with the postgresql. But, what if user going to install such module elsewhere i.e. not from contrib directory of pg source. I this way Makefile should different, right? We need to makefile code should uniform to exclude any confusion to user. if space is not such dominant, we can add code at the top of make file to avoid confusion of user to export USE_PGXS as follow ifndef USE_PGXS top_builddir = ../.. makefile_global = $(top_builddir)/src/Makefile.global ifeq "$(wildcard $(makefile_global))" "" USE_PGXS = 1 endif /* remaining code as it is */* Regards, Amul Sul
On 6/13/13 9:20 PM, amul sul wrote: > Agree, only if we consider these contrib module is always gonna deployed with the postgresql. > But, what if user going to install such module elsewhere i.e. not from contrib directory of pg source. Why would anyone do that?
On Fri, Jun 14, 2013 at 9:35 PM, Peter Eisentraut <peter_e@gmx.net> wrote: > On 6/13/13 9:20 PM, amul sul wrote: >> Agree, only if we consider these contrib module is always gonna deployed with the postgresql. >> But, what if user going to install such module elsewhere i.e. not from contrib directory of pg source. > > Why would anyone do that? Is he probably saying "install such module *from* elsewhere"? Like directly from the source directory of a module using something like following: cd /path/to/module-source make USE_PGXS=1 PG_CONFIG=/path/to/pg_config make USE_PGXS=1 PG_CONFIG=/path/to/pg_config install When user does not work with pg source directly and does not have postgresql-contrib installed? Am I missing something here? -- Amit Langote
On 06/14/2013 08:35 AM, Peter Eisentraut wrote: > On 6/13/13 9:20 PM, amul sul wrote: >> Agree, only if we consider these contrib module is always gonna deployed with the postgresql. >> But, what if user going to install such module elsewhere i.e. not from contrib directory of pg source. > Why would anyone do that? > > Maybe they wouldn't. I do think we need to make sure that we have at least buildfarm coverage of pgxs module building and testing. I have some coverage of a few extensions I have written, which exercise that, so maybe that will suffice. If not, maybe we need to have one module that only builds via pgxs and is build after an install (i.e. not via the standard contrib build). I don't really like the directory layout we use for these modules anyway, so I'm not sure they constitute best practice for extension builders. Lately I have been using an extension skeleton that looks something like this: License Readme.md META.json (for pgxn) extension.control Makefile doc/extension.md (soft linked to ../Readme.md) src/extension.c sql/extension.sql test/sql/extension.sql test/expected/extension.out cheers andrew
On 06/13/2013 11:16 AM, Peter Eisentraut wrote: > This has served no purpose except to > > 1. take up space > 2. confuse users > 3. produce broken external extension modules that take contrib as an example > 4. break builds of PostgreSQL when users try to fix 3. by exporting USE_PGXS Weak -1 from me; I find being able to build contrib modules using PGXS from the source tree extremely useful in development. It allows me to easily install an extension from a newer Pg version into an older server, test against older servers, etc. What about assuming USE_PGXS=1 if it's unset, and have recursive make set USE_PGXS=0 explicitly when invoking contrib makefiles? There'd be a behaviour change, in that you'd have to write USE_PGXS=0 when you wanted the module to build against the tree it was currently in instead of with pgxs. Maybe that's just as confusing. If everyone hates that idea I can just write a 'pgxs' command that copies the Makefile, hacks it to use PGXS, and runs it, so it's not like I lose anything critical. -- Craig Ringer http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services
Andrew Dunstan <andrew@dunslane.net> a écrit : > >On 06/14/2013 08:35 AM, Peter Eisentraut wrote: >> On 6/13/13 9:20 PM, amul sul wrote: >>> Agree, only if we consider these contrib module is always gonna >deployed with the postgresql. >>> But, what if user going to install such module elsewhere i.e. not >from contrib directory of pg source. >> Why would anyone do that? >> >> > >Maybe they wouldn't. > >I do think we need to make sure that we have at least buildfarm >coverage >of pgxs module building and testing. I have some coverage of a few >extensions I have written, which exercise that, so maybe that will >suffice. If not, maybe we need to have one module that only builds via >pgxs and is build after an install (i.e. not via the standard contrib >build). I agree, I found very useful to have all the provided extensions build with PGXS to debug it. It also offers a good set of natural regression tests. >I don't really like the directory layout we use for these modules >anyway, so I'm not sure they constitute best practice for extension >builders. Lately I have been using an extension skeleton that looks >something like this: > > License > Readme.md > META.json (for pgxn) > extension.control > Makefile > doc/extension.md (soft linked to ../Readme.md) This makes mandatory to have a MODULEDIR defined or a rule to rename it with the extension name suffixed. > src/extension.c > sql/extension.sql It is (was) the default place for regression tests....I am not sure it is a good thing to shuffle that. Also, you don't do 'c/source.c' -- Envoyé de mon téléphone, excusez la brièveté.
On 06/15/2013 06:24 AM, Cédric Villemain wrote: > Andrew Dunstan <andrew@dunslane.net> a écrit : > >> On 06/14/2013 08:35 AM, Peter Eisentraut wrote: >>> On 6/13/13 9:20 PM, amul sul wrote: >>>> Agree, only if we consider these contrib module is always gonna >> deployed with the postgresql. >>>> But, what if user going to install such module elsewhere i.e. not > >from contrib directory of pg source. >>> Why would anyone do that? >>> >>> >> Maybe they wouldn't. >> >> I do think we need to make sure that we have at least buildfarm >> coverage >> of pgxs module building and testing. I have some coverage of a few >> extensions I have written, which exercise that, so maybe that will >> suffice. If not, maybe we need to have one module that only builds via >> pgxs and is build after an install (i.e. not via the standard contrib >> build). > I agree, I found very useful to have all the provided extensions build with PGXS to debug it. > It also offers a good set of natural regression tests. > >> I don't really like the directory layout we use for these modules >> anyway, so I'm not sure they constitute best practice for extension >> builders. Lately I have been using an extension skeleton that looks >> something like this: >> >> License >> Readme.md >> META.json (for pgxn) >> extension.control >> Makefile >> doc/extension.md (soft linked to ../Readme.md) > This makes mandatory to have a MODULEDIR defined or a rule to rename it with the extension name suffixed. Of course, for extension foo this would actually be foo.md. It installs just fine like that. The makefile template has: DOCS = $(wildcard doc/*.md) > >> src/extension.c >> sql/extension.sql > It is (was) the default place for regression tests....I am not sure it is a good thing to shuffle that. > Also, you don't do 'c/source.c' > The sql here is the sql to install the extension, not part of the build nor part of the tests. Some time ago I fixed pg_regress to honor --inputdir and --outputdir properly, so my Makefile template has this: REGRESS_OPTS = --inputdir=test --outputdir=test \ --load-extension=$(EXTENSION) ... override pg_regress_clean_files= test/results/ test/regression.diffs test/regression.out tmp_check/ log/ That keeps the testing stuff out of the way quite nicely. You might not like this pattern, but I find it much saner that what we currently use. I certainly don't claim it's perfect. cheers andrew
> >> I don't really like the directory layout we use for these modules > >> anyway, so I'm not sure they constitute best practice for extension > >> builders. Lately I have been using an extension skeleton that looks > >> > >> something like this: > >> License > >> Readme.md > >> META.json (for pgxn) > >> extension.control > >> Makefile > >> doc/extension.md (soft linked to ../Readme.md) > > > > This makes mandatory to have a MODULEDIR defined or a rule to rename it > > with the extension name suffixed. > > Of course, for extension foo this would actually be foo.md. It installs > just fine like that. The makefile template has: > > DOCS = $(wildcard doc/*.md) Oh! yes, I missed the soft link. > >> src/extension.c > >> sql/extension.sql > > > > It is (was) the default place for regression tests....I am not sure it is > > a good thing to shuffle that. Also, you don't do 'c/source.c' > > The sql here is the sql to install the extension, not part of the build > nor part of the tests. I am interested by this topic, since we have Extensions we invite users to increase the usage of them. So going a step forward with a better layout is definitively something to do. What do you suggest for the previous usage ? we have a hard rule to try to put libdir in *sql.in files for example. > Some time ago I fixed pg_regress to honor --inputdir and --outputdir > properly, so my Makefile template has this: > > REGRESS_OPTS = --inputdir=test --outputdir=test \ > --load-extension=$(EXTENSION) > ... > override pg_regress_clean_files = test/results/ > test/regression.diffs test/regression.out tmp_check/ log/ > > > That keeps the testing stuff out of the way quite nicely. > > You might not like this pattern, but I find it much saner that what we > currently use. I certainly don't claim it's perfect. I am interested by this topic, since we have Extensions we invite users to increase the usage of them. So going a step forward with a better layout is definitively something to do. I have no strong assumption on what the ideal layout is, 'your' and pgxn layout are good and I won't vote against suggesting to use them (and improve PGXS to match those suggestions). -- Cédric Villemain +33 (0)6 20 30 22 52 http://2ndQuadrant.fr/ PostgreSQL: Support 24x7 - Développement, Expertise et Formation
Craig Ringer wrote: > On 06/13/2013 11:16 AM, Peter Eisentraut wrote: > > This has served no purpose except to > > > > 1. take up space > > 2. confuse users > > 3. produce broken external extension modules that take contrib as an example > > 4. break builds of PostgreSQL when users try to fix 3. by exporting USE_PGXS > > Weak -1 from me; I find being able to build contrib modules using PGXS > from the source tree extremely useful in development. It allows me to > easily install an extension from a newer Pg version into an older > server, test against older servers, etc. This use case seems too narrow to me to justify the burden of keeping PGXS-enabled makefiles in contrib. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 06/15/2013 11:28 AM, Alvaro Herrera wrote: > Craig Ringer wrote: >> On 06/13/2013 11:16 AM, Peter Eisentraut wrote: >>> This has served no purpose except to >>> >>> 1. take up space 2. confuse users 3. produce broken external >>> extension modules that take contrib as an example 4. break >>> builds of PostgreSQL when users try to fix 3. by exporting >>> USE_PGXS >> >> Weak -1 from me; I find being able to build contrib modules using >> PGXS from the source tree extremely useful in development. It >> allows me to easily install an extension from a newer Pg version >> into an older server, test against older servers, etc. > > This use case seems too narrow to me to justify the burden of > keeping PGXS-enabled makefiles in contrib. What was the burden of it? Joe - -- Joe Conway credativ LLC: http://www.credativ.us Linux, PostgreSQL, and general Open Source Training, Service, Consulting, & 24x7 Support -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJRvLWLAAoJEDfy90M199hllqIP/3ZHKaiOEidUPoRK2n9BrW3b MmHzfzn2rhOxhL4XYSxUz5mI8CDecYf5PXi1m0dwdyTCGUNWSQRiNMzN5x0Wd8v3 TVD2PS3m9XM4tWf+Y1DxSjkrDZ4KZFE8HdKFJUoCu73a0wS+nIerPC28PsPJjfen bBzaWMbZsuY37GUh3uzJW4p/KDrRV5Bh298tP2hgWPCdxpenwT3sK7+qw2Goumly Gdltp6BBkUTxpk42X72PRPx+QUwZJfmQ0QjubR+vkiYSi5otyVB2q1xr+umts+SW Z69dfxyQIp0BHaFpUB1DFVXwx+hmWyNKWwA0mIBIXQhlKh8VZXbz5ENHKnK1xPpK GcO/LFl/z5zI0CMFVFW2nwQPJ8NN+Jmru23Q53FGGsIXXJJJofCDt8U9BDLCGYpZ uq1E1/7HfIkDL0f6jDRrBmdQacnRRYWKmhEGXjQQ1Med5IG3pFiqedZj3d8xCNDU xB1wwAnIOiLnIo8WF2eIeYzuPQ5gN+xZFpUrQz+tt3UBuIsvhxXI1qQvJwRnwJTx O30Aw7zZYbnI+zZvkO1ibyIUUp8byE0DuIBwg2ergKTD4BVpKi2ThIntSXY3W/hO JzwulZfaQ120NBmrDXx641SnkXlRmMYK82KzJcDFMcyR6y04dZVhrUi0Ml2Yno6Z dsi1AdDZJpBJq9nwIJ53 =fVLk -----END PGP SIGNATURE-----
On Jun 15, 2013, at 4:12 AM, Andrew Dunstan <andrew@dunslane.net> wrote: > REGRESS_OPTS = --inputdir=test --outputdir=test \ > --load-extension=$(EXTENSION) > ... > override pg_regress_clean_files = test/results/ > test/regression.diffs test/regression.out tmp_check/ log/ > > > That keeps the testing stuff out of the way quite nicely. I don't suppose there could be a way for the makefile to notice the --outputdir option and add those files to the clean targetitself, could there? Having it hard-coded is slightly annoying. Maybe it could ask pg_regress where to find them? Thanks, David
On 06/15/2013 02:43 PM, David E. Wheeler wrote: > On Jun 15, 2013, at 4:12 AM, Andrew Dunstan <andrew@dunslane.net> wrote: > >> REGRESS_OPTS = --inputdir=test --outputdir=test \ >> --load-extension=$(EXTENSION) >> ... >> override pg_regress_clean_files = test/results/ >> test/regression.diffs test/regression.out tmp_check/ log/ >> >> >> That keeps the testing stuff out of the way quite nicely. > I don't suppose there could be a way for the makefile to notice the --outputdir option and add those files to the cleantarget itself, could there? Having it hard-coded is slightly annoying. Maybe it could ask pg_regress where to find them? > That doesn't sound like a promising line of development to me. Better would be to provide a PGXS option to specify where tests are based, and set the clean target accordingly. Then instead of the above you'd just be able to say something like MODULETEST = test REGRESS_OPTS = --load-extension=$(EXTENSION) Which would be a good deal cleaner. cheers andrew
Le samedi 15 juin 2013 23:45:21, Andrew Dunstan a écrit : > On 06/15/2013 02:43 PM, David E. Wheeler wrote: > > On Jun 15, 2013, at 4:12 AM, Andrew Dunstan <andrew@dunslane.net> wrote: > >> REGRESS_OPTS = --inputdir=test --outputdir=test \ > >> > >> --load-extension=$(EXTENSION) > >> > >> ... > >> override pg_regress_clean_files = test/results/ > >> test/regression.diffs test/regression.out tmp_check/ log/ > >> > >> That keeps the testing stuff out of the way quite nicely. > > > > I don't suppose there could be a way for the makefile to notice the > > --outputdir option and add those files to the clean target itself, could > > there? Having it hard-coded is slightly annoying. Maybe it could ask > > pg_regress where to find them? > > That doesn't sound like a promising line of development to me. Better > would be to provide a PGXS option to specify where tests are based, and > set the clean target accordingly. > > Then instead of the above you'd just be able to say something like > > MODULETEST = test or REGRESSDIR ? Also I suggest to remove the need to set REGRESS at all, and default to all sql files in REGRESSDIR/sql (if REGRESSDIR is set) Back to DOCS, we may also have PGXS default to find a README(.*) and rename it to README.$extension.$1 if MODULEDIR is not set. > REGRESS_OPTS = --load-extension=$(EXTENSION) > > Which would be a good deal cleaner. yes. -- Cédric Villemain +33 (0)6 20 30 22 52 http://2ndQuadrant.fr/ PostgreSQL: Support 24x7 - Développement, Expertise et Formation
Hi, Peter Eisentraut <peter_e@gmx.net> writes: > 2. confuse users > 3. produce broken external extension modules that take contrib as an example I agree that having both cases (sections) in the Makefile is a bad idea. Still, why should we keep the in-tree build instructions? Would it be possible instead to instruct PGXN to work with a non installed server source tree? And how much do we need that really? Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
On Jun 16, 2013, at 9:20 AM, Cédric Villemain <cedric@2ndquadrant.com> wrote: >> Then instead of the above you'd just be able to say something like >> >> MODULETEST = test > > or REGRESSDIR ? Yeah, that sounds perfect. > Also I suggest to remove the need to set REGRESS at all, and default to all > sql files in REGRESSDIR/sql (if REGRESSDIR is set) Yeah, that would be nice. If one has different file names or something, then one should still be able to set REGRESS. Best, David
Joe Conway wrote: > On 06/15/2013 11:28 AM, Alvaro Herrera wrote: > > This use case seems too narrow to me to justify the burden of > > keeping PGXS-enabled makefiles in contrib. > > What was the burden of it? Per http://www.postgresql.org/message-id/1371093408.309.5.camel@vanquo.pezone.net : : 1. take up space : 2. confuse users : 3. produce broken external extension modules that take contrib as an example : 4. break builds of PostgreSQL when users try to fix 3. by exporting USE_PGXS -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Le lundi 17 juin 2013 18:41:32, Alvaro Herrera a écrit : > Joe Conway wrote: > > On 06/15/2013 11:28 AM, Alvaro Herrera wrote: > > > This use case seems too narrow to me to justify the burden of > > > keeping PGXS-enabled makefiles in contrib. > > > > What was the burden of it? > > Per http://www.postgresql.org/message- id/1371093408.309.5.camel@vanquo.pezone.net : > : 1. take up space > : 2. confuse users > : 3. produce broken external extension modules that take contrib as an > : example 4. break builds of PostgreSQL when users try to fix 3. by > : exporting USE_PGXS But: 4. can be fixed (see patches I sent) so it is not an excuse. I agree for other points. My only grief is to loose the perfect regression tests for PGXS those contribs are. -- Cédric Villemain +33 (0)6 20 30 22 52 http://2ndQuadrant.fr/ PostgreSQL: Support 24x7 - Développement, Expertise et Formation
On Fri, 2013-06-14 at 09:32 -0400, Andrew Dunstan wrote: > I do think we need to make sure that we have at least buildfarm > coverage of pgxs module building and testing. I have some coverage of > a few extensions I have written, which exercise that, so maybe that > will suffice. If not, maybe we need to have one module that only > builds via pgxs and is build after an install (i.e. not via the > standard contrib build). The way to test pgxs is to build actual pgxs modules, and possibly some unit tests made for the purpose. Testing with fake hybrid modules that will never actually appear that way in practice isn't going to satisfy anyone.
On Sun, 2013-06-16 at 18:20 +0200, Cédric Villemain wrote: > Also I suggest to remove the need to set REGRESS at all, and default > to all sql files in REGRESSDIR/sql (if REGRESSDIR is set) I'm not so sure about that. I have some extensions where the list of tests is composed at build time depending on the target version (e.g., supports extensions, inline, event triggers, etc.). In a different world, we'd have "skip" functionality for that sort of thing, but for now building up the list of tests seems best.
On Mon, 2013-06-17 at 19:00 +0200, Cédric Villemain wrote: > My only grief is to loose the perfect regression tests for PGXS those > contribs are. I think they are neither perfect nor regression tests. If we want tests, let's write tests.
On Mon, 2013-06-17 at 11:41 +0200, Dimitri Fontaine wrote: > I agree that having both cases (sections) in the Makefile is a bad > idea. > Still, why should we keep the in-tree build instructions? > > Would it be possible instead to instruct PGXN to work with a non > installed server source tree? And how much do we need that really? We could do something like PG_CONFIG = fake_intree_pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS) where fake_intree_pg_config is a purpose-built shell script that points to the right places inside the source tree.
Le mercredi 19 juin 2013 04:58:15, Peter Eisentraut a écrit : > On Mon, 2013-06-17 at 19:00 +0200, Cédric Villemain wrote: > > My only grief is to loose the perfect regression tests for PGXS those > > contribs are. > > I think they are neither perfect nor regression tests. If we want > tests, let's write tests. You are right. -- Cédric Villemain +33 (0)6 20 30 22 52 http://2ndQuadrant.fr/ PostgreSQL: Support 24x7 - Développement, Expertise et Formation
Le jeudi 13 juin 2013 05:16:48, Peter Eisentraut a écrit : > This has served no purpose except to > > 1. take up space > 2. confuse users > 3. produce broken external extension modules that take contrib as an > example 4. break builds of PostgreSQL when users try to fix 3. by > exporting USE_PGXS > > There is adequate material in the documentation and elsewhere (PGXN) on > how to write extensions and their makefiles, so this is not needed. > --- > pursuant to discussion here: > http://www.postgresql.org/message-id/512CEAB8.9010400@gmx.net * Submission review: patch apply on HEAD, no doc or test required. * Usability review ** Does the patch actually implement that? yes ** Do we want that? Consensus is not complete: some use case raised. 1/ regression test: not a good excuse, see [1] 2/ being able to build contrib out of tree, it is unsure it is really needed on its own but was suggested. See [2] and [3] Arguments against removal are new features (extension layout, more work on PGXS shoulders, extension headers exported, clean regression test for PGXS) ** Does it follow the community-agreed behavior? Some people voiced against the idea. More answers might be better to confirm that this is wanted. Amul, Joe, Craig ? ** Are there dangers? The only I can see is packagers building contribs with PGXS, but as it is currently buggy I'm sure they can't do that. * Feature test: it deprecates a not-fully-implemented-feature (even fully implemented this may not be considered a feature at all) * Performance review: not relevant (contribs may build some µs faster...) * Coding review: OK * Architecture review: looks good too. The patch needs to reach consensus before commit. There is no status for that in CF, for me current status is: 'Ready, Waiting more feedback from community'. [1] http://www.postgresql.org/message- id/1371610695.13762.25.camel@vanquo.pezone.net [2] http://www.postgresql.org/message- id/1371172850.79798.YahooMailNeo@web193505.mail.sg3.yahoo.com [3] http://www.postgresql.org/message-id/51BBE3A5.40607@2ndquadrant.com -- Cédric Villemain +33 (0)6 20 30 22 52 http://2ndQuadrant.fr/ PostgreSQL: Support 24x7 - Développement, Expertise et Formation
Peter Eisentraut <peter_e@gmx.net> writes: > We could do something like > > PG_CONFIG = fake_intree_pg_config > PGXS := $(shell $(PG_CONFIG) --pgxs) > include $(PGXS) There's something to that idea. Of course we would need to offer a comment about the PG_CONFIG game and propose something else for real world extensions (PG_CONFIG ?= pg_config). > where fake_intree_pg_config is a purpose-built shell script that points > to the right places inside the source tree. If that works, that gets my preference over removing PGXS support in contrib modules. Setting an example is important, in-tree build is not a useful example for anyone but contributors to core. Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
On 06/19/2013 03:52 PM, Dimitri Fontaine wrote: > Peter Eisentraut <peter_e@gmx.net> writes: >> We could do something like >> >> PG_CONFIG = fake_intree_pg_config >> PGXS := $(shell $(PG_CONFIG) --pgxs) >> include $(PGXS) > There's something to that idea. Of course we would need to offer a > comment about the PG_CONFIG game and propose something else for real > world extensions (PG_CONFIG ?= pg_config). > >> where fake_intree_pg_config is a purpose-built shell script that points >> to the right places inside the source tree. > If that works, that gets my preference over removing PGXS support in > contrib modules. Setting an example is important, in-tree build is not > a useful example for anyone but contributors to core. > Not true - you're forgetting there is no pgxs for MSVC builds. If we're going to enable building of contrib modules using pgxs but without an install we will make targets for that, and buildfarm support. cheers andrew
Andrew Dunstan <andrew@dunslane.net> writes: > Not true - you're forgetting there is no pgxs for MSVC builds. Oh, indeed, totally forgot about that. > If we're going to enable building of contrib modules using pgxs but without > an install we will make targets for that, and buildfarm support. So we would need some kind of windows only pgxs.pl script? Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
On 06/19/2013 04:47 PM, Dimitri Fontaine wrote: > Andrew Dunstan <andrew@dunslane.net> writes: >> Not true - you're forgetting there is no pgxs for MSVC builds. > Oh, indeed, totally forgot about that. > >> If we're going to enable building of contrib modules using pgxs but without >> an install we will make targets for that, and buildfarm support. > So we would need some kind of windows only pgxs.pl script? Well, MSVC support and buildfarm support are two separate issues. For out of tree MSVC builds we would probably need to install a substantial part of src/tools/msvc, and have a script that could generate a Project and so on. I'm happy to help but it probably needs someone with a deeper knowledge than I have of the internal workings of MSVC project files to build it. It's worth doing - I know some people who find this a major barrier. cheers andrew
Le mercredi 19 juin 2013 22:22:22, Andrew Dunstan a écrit : > On 06/19/2013 03:52 PM, Dimitri Fontaine wrote: > > Peter Eisentraut <peter_e@gmx.net> writes: > >> We could do something like > >> > >> PG_CONFIG = fake_intree_pg_config > >> PGXS := $(shell $(PG_CONFIG) --pgxs) > >> include $(PGXS) > > > > There's something to that idea. Of course we would need to offer a > > comment about the PG_CONFIG game and propose something else for real > > world extensions (PG_CONFIG ?= pg_config). > > > >> where fake_intree_pg_config is a purpose-built shell script that points > >> to the right places inside the source tree. > > > > If that works, that gets my preference over removing PGXS support in > > contrib modules. Setting an example is important, in-tree build is not > > a useful example for anyone but contributors to core. > > Not true - you're forgetting there is no pgxs for MSVC builds. PGXS + MSVC is still in the TODO list.... I won't be able to work on that. > If we're going to enable building of contrib modules using pgxs but > without an install we will make targets for that, and buildfarm support. With the set of patches I sent, contrib can be built with PGXS, there is no issue here....Except maybe pg_xlogdump, and this one might be improved not to have to rebuild shared object from postgresql (IIRC it is a static build or something like that)... -- Cédric Villemain +33 (0)6 20 30 22 52 http://2ndQuadrant.fr/ PostgreSQL: Support 24x7 - Développement, Expertise et Formation
Peter, Cedric, etc.: Where are we on this patch? Seems like discussion died out. Should it be bounced? -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Lemercredi 3 juillet 2013 23:56:42, Josh Berkus a écrit :<p style=" margin-top:0px; margin-bottom:0px;margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> Peter,Cedric, etc.:<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;-qt-user-state:0;">> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> Where are we on this patch? Seems like discussiondied out. Should it<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0;text-indent:0px; -qt-user-state:0;">> be bounced?<p style="-qt-paragraph-type:empty; margin-top:0px;margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> <p style=" margin-top:0px;margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Ifor myself have been presuaded that it is a good idea. Things apparently loosed are not, it just outlinethat we need better coverage in PGXS area, so it is another thing to consider (TODO : add resgress test for PGXS ...)<pstyle=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;-qt-user-state:0;">-- <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0;text-indent:0px; -qt-user-state:0;">Cédric Villemain +33 (0)6 20 30 22 52<p style=" margin-top:0px; margin-bottom:0px;margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">http://2ndQuadrant.fr/<pstyle=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">PostgreSQL: Support 24x7 - Développement, Expertiseet Formation<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;-qt-block-indent:0; text-indent:0px; ">
On 07/04/2013 06:11 AM, Cédric Villemain wrote: > Le mercredi 3 juillet 2013 23:56:42, Josh Berkus a écrit : >> Peter, Cedric, etc.: >> >> Where are we on this patch? Seems like discussion died out. Should it >> be bounced? > > I for myself have been presuaded that it is a good idea. Things apparently loosed are not, it just outline that we needbetter coverage in PGXS area, so it is another thing to consider (TODO : add resgress test for PGXS ...) > To be more focused: is this patch going to be committed in the next 4 days or not? If not, it's time to mark it "returned" so we can have leisurely spec argument later. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com
On 07/10/2013 09:04 PM, Josh Berkus wrote: > On 07/04/2013 06:11 AM, Cédric Villemain wrote: >> Le mercredi 3 juillet 2013 23:56:42, Josh Berkus a écrit : >>> Peter, Cedric, etc.: >>> >>> Where are we on this patch? Seems like discussion died out. Should it >>> be bounced? >> I for myself have been presuaded that it is a good idea. Things apparently loosed are not, it just outline that we needbetter coverage in PGXS area, so it is another thing to consider (TODO : add resgress test for PGXS ...) >> > To be more focused: is this patch going to be committed in the next 4 > days or not? If not, it's time to mark it "returned" so we can have > leisurely spec argument later. I think that would probably be the better course. I'm not sure there is a consensus about this. cheers andrew >