aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-06-23 02:33:28 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-06-23 02:33:28 +0000
commit2f5c47e882d9cda2395223d01d3d93611b1dfe77 (patch)
tree35b5a6ed5ce1fbf7b4f711604f66e1a538f5dd75
parent5b0c9d3603b027e022b8a0ebd4c492469a5d1633 (diff)
downloadpostgresql-2f5c47e882d9cda2395223d01d3d93611b1dfe77.tar.gz
postgresql-2f5c47e882d9cda2395223d01d3d93611b1dfe77.zip
Move findoidjoins out of contrib and into src/tools, which is a more
logical place for it since it is of no use to users. Per recent discussions on cleaning up contrib.
-rw-r--r--contrib/Makefile3
-rw-r--r--contrib/README5
-rw-r--r--contrib/findoidjoins/Makefile20
-rw-r--r--src/tools/findoidjoins/Makefile25
-rw-r--r--src/tools/findoidjoins/README (renamed from contrib/findoidjoins/README.findoidjoins)16
-rw-r--r--src/tools/findoidjoins/findoidjoins.c (renamed from contrib/findoidjoins/findoidjoins.c)2
-rwxr-xr-xsrc/tools/findoidjoins/make_oidjoins_check (renamed from contrib/findoidjoins/make_oidjoins_check)0
7 files changed, 35 insertions, 36 deletions
diff --git a/contrib/Makefile b/contrib/Makefile
index 893a2c6e0b9..0641b50872d 100644
--- a/contrib/Makefile
+++ b/contrib/Makefile
@@ -1,4 +1,4 @@
-# $PostgreSQL: pgsql/contrib/Makefile,v 1.55 2005/06/22 22:56:25 tgl Exp $
+# $PostgreSQL: pgsql/contrib/Makefile,v 1.56 2005/06/23 02:33:25 tgl Exp $
subdir = contrib
top_builddir = ..
@@ -13,7 +13,6 @@ WANTED_DIRS = \
dbmirror \
dbsize \
earthdistance \
- findoidjoins \
fulltextindex \
fuzzystrmatch \
intagg \
diff --git a/contrib/README b/contrib/README
index f14481c7bae..3e1ae62b00c 100644
--- a/contrib/README
+++ b/contrib/README
@@ -62,11 +62,6 @@ earthdistance -
Operator for computing earth distance for two points
by Hal Snyder <hal@vailsys.com>
-findoidjoins -
- Finds the joins used by oid columns by examining the actual
- values in the oid columns and row oids.
- by Bruce Momjian <pgman@candle.pha.pa.us>
-
fulltextindex -
Full text indexing using triggers
by Maarten Boekhold <maartenb@dutepp0.et.tudelft.nl>
diff --git a/contrib/findoidjoins/Makefile b/contrib/findoidjoins/Makefile
deleted file mode 100644
index a15378a2a23..00000000000
--- a/contrib/findoidjoins/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-# $PostgreSQL: pgsql/contrib/findoidjoins/Makefile,v 1.17 2005/03/25 18:17:10 momjian Exp $
-
-PROGRAM = findoidjoins
-OBJS = findoidjoins.o
-
-PG_CPPFLAGS = -I$(libpq_srcdir)
-PG_LIBS = $(libpq_pgport)
-
-SCRIPTS = make_oidjoins_check
-DOCS = README.findoidjoins
-
-ifdef USE_PGXS
-PGXS = $(shell pg_config --pgxs)
-include $(PGXS)
-else
-subdir = contrib/findoidjoins
-top_builddir = ../..
-include $(top_builddir)/src/Makefile.global
-include $(top_srcdir)/contrib/contrib-global.mk
-endif
diff --git a/src/tools/findoidjoins/Makefile b/src/tools/findoidjoins/Makefile
new file mode 100644
index 00000000000..5a11276bf41
--- /dev/null
+++ b/src/tools/findoidjoins/Makefile
@@ -0,0 +1,25 @@
+#-------------------------------------------------------------------------
+#
+# Makefile for src/tools/findoidjoins
+#
+# Copyright (c) 2003-2005, PostgreSQL Global Development Group
+#
+# $PostgreSQL: pgsql/src/tools/findoidjoins/Makefile,v 1.1 2005/06/23 02:33:28 tgl Exp $
+#
+#-------------------------------------------------------------------------
+
+subdir = src/tools/findoidjoins
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
+
+override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS)
+
+OBJS= findoidjoins.o
+
+all: submake-libpq submake-libpgport findoidjoins
+
+findoidjoins: findoidjoins.o $(libpq_builddir)/libpq.a
+ $(CC) $(CFLAGS) findoidjoins.o $(libpq_pgport) $(LDFLAGS) $(LIBS) -o $@$(X)
+
+clean distclean maintainer-clean:
+ rm -f findoidjoins$(X) $(OBJS)
diff --git a/contrib/findoidjoins/README.findoidjoins b/src/tools/findoidjoins/README
index a96641430ab..ce31b194728 100644
--- a/contrib/findoidjoins/README.findoidjoins
+++ b/src/tools/findoidjoins/README
@@ -7,10 +7,10 @@ anything but an empty database, such as template1; else it's likely to
be very slow.
Run on an empty database, it returns the system join relationships (shown
-below for 8.0). Note that unexpected matches may indicate bogus entries
+below for 8.1). Note that unexpected matches may indicate bogus entries
in system tables --- don't accept a peculiar match without question.
In particular, a field shown as joining to more than one target table is
-probably messed up. In 8.0, the *only* fields that should join to more
+probably messed up. In 8.1, the *only* fields that should join to more
than one target are pg_description.objoid, pg_depend.objid, and
pg_depend.refobjid. (Running make_oidjoins_check is an easy way to spot
fields joining to more than one table, BTW.)
@@ -26,22 +26,22 @@ revision in the patterns of cross-links between system tables.
(Ideally we'd just regenerate the script as part of the regression
tests themselves, but that seems too slow...)
-NOTE: in 8.0, make_oidjoins_check produces one bogus join check:
+NOTE: in 8.1, make_oidjoins_check produces two bogus join checks:
Join pg_catalog.pg_class.relfilenode => pg_catalog.pg_class.oid
-This is an artifact and should not be added to the oidjoins regress test.
-Also beware of any claim that pg_database.datlastsysoid joins to anything;
-this does not actually happen in 8.0, but it did happen before and might
-happen again in future, depending on what operation initdb does last.
+Join pg_catalog.pg_database.datlastsysoid => pg_catalog.pg_database.oid
+These are artifacts and should not be added to the oidjoins regress test.
---------------------------------------------------------------------------
Join pg_catalog.pg_aggregate.aggfnoid => pg_catalog.pg_proc.oid
Join pg_catalog.pg_aggregate.aggtransfn => pg_catalog.pg_proc.oid
Join pg_catalog.pg_aggregate.aggfinalfn => pg_catalog.pg_proc.oid
+Join pg_catalog.pg_aggregate.aggsortop => pg_catalog.pg_operator.oid
Join pg_catalog.pg_aggregate.aggtranstype => pg_catalog.pg_type.oid
-Join pg_catalog.pg_am.amgettuple => pg_catalog.pg_proc.oid
Join pg_catalog.pg_am.aminsert => pg_catalog.pg_proc.oid
Join pg_catalog.pg_am.ambeginscan => pg_catalog.pg_proc.oid
+Join pg_catalog.pg_am.amgettuple => pg_catalog.pg_proc.oid
+Join pg_catalog.pg_am.amgetmulti => pg_catalog.pg_proc.oid
Join pg_catalog.pg_am.amrescan => pg_catalog.pg_proc.oid
Join pg_catalog.pg_am.amendscan => pg_catalog.pg_proc.oid
Join pg_catalog.pg_am.ammarkpos => pg_catalog.pg_proc.oid
diff --git a/contrib/findoidjoins/findoidjoins.c b/src/tools/findoidjoins/findoidjoins.c
index 3afcd7c3c35..db1fc12460c 100644
--- a/contrib/findoidjoins/findoidjoins.c
+++ b/src/tools/findoidjoins/findoidjoins.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2002-2005, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/contrib/findoidjoins/findoidjoins.c,v 1.25 2005/01/01 05:43:05 momjian Exp $
+ * $PostgreSQL: pgsql/src/tools/findoidjoins/findoidjoins.c,v 1.1 2005/06/23 02:33:28 tgl Exp $
*/
#include "postgres_fe.h"
diff --git a/contrib/findoidjoins/make_oidjoins_check b/src/tools/findoidjoins/make_oidjoins_check
index b6a720a5048..b6a720a5048 100755
--- a/contrib/findoidjoins/make_oidjoins_check
+++ b/src/tools/findoidjoins/make_oidjoins_check