Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
970d8a39
Commit
970d8a39
authored
Apr 23, 2011
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update oidjoins regression test for 9.1 catalog schema additions.
parent
a0b75a41
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
124 additions
and
7 deletions
+124
-7
src/test/regress/expected/oidjoins.out
src/test/regress/expected/oidjoins.out
+72
-0
src/test/regress/sql/oidjoins.sql
src/test/regress/sql/oidjoins.sql
+36
-0
src/tools/findoidjoins/README
src/tools/findoidjoins/README
+13
-4
src/tools/findoidjoins/make_oidjoins_check
src/tools/findoidjoins/make_oidjoins_check
+3
-3
No files found.
src/test/regress/expected/oidjoins.out
View file @
970d8a39
...
@@ -121,6 +121,14 @@ WHERE ambuild != 0 AND
...
@@ -121,6 +121,14 @@ WHERE ambuild != 0 AND
------+---------
------+---------
(0 rows)
(0 rows)
SELECT ctid, ambuildempty
FROM pg_catalog.pg_am fk
WHERE ambuildempty != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_proc pk WHERE pk.oid = fk.ambuildempty);
ctid | ambuildempty
------+--------------
(0 rows)
SELECT ctid, ambulkdelete
SELECT ctid, ambulkdelete
FROM pg_catalog.pg_am fk
FROM pg_catalog.pg_am fk
WHERE ambulkdelete != 0 AND
WHERE ambulkdelete != 0 AND
...
@@ -193,6 +201,14 @@ WHERE amopmethod != 0 AND
...
@@ -193,6 +201,14 @@ WHERE amopmethod != 0 AND
------+------------
------+------------
(0 rows)
(0 rows)
SELECT ctid, amopsortfamily
FROM pg_catalog.pg_amop fk
WHERE amopsortfamily != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_opfamily pk WHERE pk.oid = fk.amopsortfamily);
ctid | amopsortfamily
------+----------------
(0 rows)
SELECT ctid, amprocfamily
SELECT ctid, amprocfamily
FROM pg_catalog.pg_amproc fk
FROM pg_catalog.pg_amproc fk
WHERE amprocfamily != 0 AND
WHERE amprocfamily != 0 AND
...
@@ -241,6 +257,14 @@ WHERE atttypid != 0 AND
...
@@ -241,6 +257,14 @@ WHERE atttypid != 0 AND
------+----------
------+----------
(0 rows)
(0 rows)
SELECT ctid, attcollation
FROM pg_catalog.pg_attribute fk
WHERE attcollation != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_collation pk WHERE pk.oid = fk.attcollation);
ctid | attcollation
------+--------------
(0 rows)
SELECT ctid, castsource
SELECT ctid, castsource
FROM pg_catalog.pg_cast fk
FROM pg_catalog.pg_cast fk
WHERE castsource != 0 AND
WHERE castsource != 0 AND
...
@@ -321,6 +345,22 @@ WHERE reltoastidxid != 0 AND
...
@@ -321,6 +345,22 @@ WHERE reltoastidxid != 0 AND
------+---------------
------+---------------
(0 rows)
(0 rows)
SELECT ctid, collnamespace
FROM pg_catalog.pg_collation fk
WHERE collnamespace != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_namespace pk WHERE pk.oid = fk.collnamespace);
ctid | collnamespace
------+---------------
(0 rows)
SELECT ctid, collowner
FROM pg_catalog.pg_collation fk
WHERE collowner != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_authid pk WHERE pk.oid = fk.collowner);
ctid | collowner
------+-----------
(0 rows)
SELECT ctid, connamespace
SELECT ctid, connamespace
FROM pg_catalog.pg_constraint fk
FROM pg_catalog.pg_constraint fk
WHERE connamespace != 0 AND
WHERE connamespace != 0 AND
...
@@ -409,6 +449,22 @@ WHERE classoid != 0 AND
...
@@ -409,6 +449,22 @@ WHERE classoid != 0 AND
------+----------
------+----------
(0 rows)
(0 rows)
SELECT ctid, extowner
FROM pg_catalog.pg_extension fk
WHERE extowner != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_authid pk WHERE pk.oid = fk.extowner);
ctid | extowner
------+----------
(0 rows)
SELECT ctid, extnamespace
FROM pg_catalog.pg_extension fk
WHERE extnamespace != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_namespace pk WHERE pk.oid = fk.extnamespace);
ctid | extnamespace
------+--------------
(0 rows)
SELECT ctid, indexrelid
SELECT ctid, indexrelid
FROM pg_catalog.pg_index fk
FROM pg_catalog.pg_index fk
WHERE indexrelid != 0 AND
WHERE indexrelid != 0 AND
...
@@ -641,6 +697,14 @@ WHERE prolang != 0 AND
...
@@ -641,6 +697,14 @@ WHERE prolang != 0 AND
------+---------
------+---------
(0 rows)
(0 rows)
SELECT ctid, provariadic
FROM pg_catalog.pg_proc fk
WHERE provariadic != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_type pk WHERE pk.oid = fk.provariadic);
ctid | provariadic
------+-------------
(0 rows)
SELECT ctid, prorettype
SELECT ctid, prorettype
FROM pg_catalog.pg_proc fk
FROM pg_catalog.pg_proc fk
WHERE prorettype != 0 AND
WHERE prorettype != 0 AND
...
@@ -953,3 +1017,11 @@ WHERE typbasetype != 0 AND
...
@@ -953,3 +1017,11 @@ WHERE typbasetype != 0 AND
------+-------------
------+-------------
(0 rows)
(0 rows)
SELECT ctid, typcollation
FROM pg_catalog.pg_type fk
WHERE typcollation != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_collation pk WHERE pk.oid = fk.typcollation);
ctid | typcollation
------+--------------
(0 rows)
src/test/regress/sql/oidjoins.sql
View file @
970d8a39
...
@@ -61,6 +61,10 @@ SELECT ctid, ambuild
...
@@ -61,6 +61,10 @@ SELECT ctid, ambuild
FROM
pg_catalog
.
pg_am
fk
FROM
pg_catalog
.
pg_am
fk
WHERE
ambuild
!=
0
AND
WHERE
ambuild
!=
0
AND
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_proc
pk
WHERE
pk
.
oid
=
fk
.
ambuild
);
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_proc
pk
WHERE
pk
.
oid
=
fk
.
ambuild
);
SELECT
ctid
,
ambuildempty
FROM
pg_catalog
.
pg_am
fk
WHERE
ambuildempty
!=
0
AND
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_proc
pk
WHERE
pk
.
oid
=
fk
.
ambuildempty
);
SELECT
ctid
,
ambulkdelete
SELECT
ctid
,
ambulkdelete
FROM
pg_catalog
.
pg_am
fk
FROM
pg_catalog
.
pg_am
fk
WHERE
ambulkdelete
!=
0
AND
WHERE
ambulkdelete
!=
0
AND
...
@@ -97,6 +101,10 @@ SELECT ctid, amopmethod
...
@@ -97,6 +101,10 @@ SELECT ctid, amopmethod
FROM
pg_catalog
.
pg_amop
fk
FROM
pg_catalog
.
pg_amop
fk
WHERE
amopmethod
!=
0
AND
WHERE
amopmethod
!=
0
AND
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_am
pk
WHERE
pk
.
oid
=
fk
.
amopmethod
);
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_am
pk
WHERE
pk
.
oid
=
fk
.
amopmethod
);
SELECT
ctid
,
amopsortfamily
FROM
pg_catalog
.
pg_amop
fk
WHERE
amopsortfamily
!=
0
AND
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_opfamily
pk
WHERE
pk
.
oid
=
fk
.
amopsortfamily
);
SELECT
ctid
,
amprocfamily
SELECT
ctid
,
amprocfamily
FROM
pg_catalog
.
pg_amproc
fk
FROM
pg_catalog
.
pg_amproc
fk
WHERE
amprocfamily
!=
0
AND
WHERE
amprocfamily
!=
0
AND
...
@@ -121,6 +129,10 @@ SELECT ctid, atttypid
...
@@ -121,6 +129,10 @@ SELECT ctid, atttypid
FROM
pg_catalog
.
pg_attribute
fk
FROM
pg_catalog
.
pg_attribute
fk
WHERE
atttypid
!=
0
AND
WHERE
atttypid
!=
0
AND
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_type
pk
WHERE
pk
.
oid
=
fk
.
atttypid
);
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_type
pk
WHERE
pk
.
oid
=
fk
.
atttypid
);
SELECT
ctid
,
attcollation
FROM
pg_catalog
.
pg_attribute
fk
WHERE
attcollation
!=
0
AND
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_collation
pk
WHERE
pk
.
oid
=
fk
.
attcollation
);
SELECT
ctid
,
castsource
SELECT
ctid
,
castsource
FROM
pg_catalog
.
pg_cast
fk
FROM
pg_catalog
.
pg_cast
fk
WHERE
castsource
!=
0
AND
WHERE
castsource
!=
0
AND
...
@@ -161,6 +173,14 @@ SELECT ctid, reltoastidxid
...
@@ -161,6 +173,14 @@ SELECT ctid, reltoastidxid
FROM
pg_catalog
.
pg_class
fk
FROM
pg_catalog
.
pg_class
fk
WHERE
reltoastidxid
!=
0
AND
WHERE
reltoastidxid
!=
0
AND
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_class
pk
WHERE
pk
.
oid
=
fk
.
reltoastidxid
);
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_class
pk
WHERE
pk
.
oid
=
fk
.
reltoastidxid
);
SELECT
ctid
,
collnamespace
FROM
pg_catalog
.
pg_collation
fk
WHERE
collnamespace
!=
0
AND
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_namespace
pk
WHERE
pk
.
oid
=
fk
.
collnamespace
);
SELECT
ctid
,
collowner
FROM
pg_catalog
.
pg_collation
fk
WHERE
collowner
!=
0
AND
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_authid
pk
WHERE
pk
.
oid
=
fk
.
collowner
);
SELECT
ctid
,
connamespace
SELECT
ctid
,
connamespace
FROM
pg_catalog
.
pg_constraint
fk
FROM
pg_catalog
.
pg_constraint
fk
WHERE
connamespace
!=
0
AND
WHERE
connamespace
!=
0
AND
...
@@ -205,6 +225,14 @@ SELECT ctid, classoid
...
@@ -205,6 +225,14 @@ SELECT ctid, classoid
FROM
pg_catalog
.
pg_description
fk
FROM
pg_catalog
.
pg_description
fk
WHERE
classoid
!=
0
AND
WHERE
classoid
!=
0
AND
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_class
pk
WHERE
pk
.
oid
=
fk
.
classoid
);
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_class
pk
WHERE
pk
.
oid
=
fk
.
classoid
);
SELECT
ctid
,
extowner
FROM
pg_catalog
.
pg_extension
fk
WHERE
extowner
!=
0
AND
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_authid
pk
WHERE
pk
.
oid
=
fk
.
extowner
);
SELECT
ctid
,
extnamespace
FROM
pg_catalog
.
pg_extension
fk
WHERE
extnamespace
!=
0
AND
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_namespace
pk
WHERE
pk
.
oid
=
fk
.
extnamespace
);
SELECT
ctid
,
indexrelid
SELECT
ctid
,
indexrelid
FROM
pg_catalog
.
pg_index
fk
FROM
pg_catalog
.
pg_index
fk
WHERE
indexrelid
!=
0
AND
WHERE
indexrelid
!=
0
AND
...
@@ -321,6 +349,10 @@ SELECT ctid, prolang
...
@@ -321,6 +349,10 @@ SELECT ctid, prolang
FROM
pg_catalog
.
pg_proc
fk
FROM
pg_catalog
.
pg_proc
fk
WHERE
prolang
!=
0
AND
WHERE
prolang
!=
0
AND
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_language
pk
WHERE
pk
.
oid
=
fk
.
prolang
);
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_language
pk
WHERE
pk
.
oid
=
fk
.
prolang
);
SELECT
ctid
,
provariadic
FROM
pg_catalog
.
pg_proc
fk
WHERE
provariadic
!=
0
AND
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_type
pk
WHERE
pk
.
oid
=
fk
.
provariadic
);
SELECT
ctid
,
prorettype
SELECT
ctid
,
prorettype
FROM
pg_catalog
.
pg_proc
fk
FROM
pg_catalog
.
pg_proc
fk
WHERE
prorettype
!=
0
AND
WHERE
prorettype
!=
0
AND
...
@@ -477,3 +509,7 @@ SELECT ctid, typbasetype
...
@@ -477,3 +509,7 @@ SELECT ctid, typbasetype
FROM
pg_catalog
.
pg_type
fk
FROM
pg_catalog
.
pg_type
fk
WHERE
typbasetype
!=
0
AND
WHERE
typbasetype
!=
0
AND
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_type
pk
WHERE
pk
.
oid
=
fk
.
typbasetype
);
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_type
pk
WHERE
pk
.
oid
=
fk
.
typbasetype
);
SELECT
ctid
,
typcollation
FROM
pg_catalog
.
pg_type
fk
WHERE
typcollation
!=
0
AND
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_collation
pk
WHERE
pk
.
oid
=
fk
.
typcollation
);
src/tools/findoidjoins/README
View file @
970d8a39
...
@@ -9,10 +9,10 @@ anything but an empty database, such as template1; else it's likely to
...
@@ -9,10 +9,10 @@ anything but an empty database, such as template1; else it's likely to
be very slow.
be very slow.
Run on an empty database, it returns the system join relationships (shown
Run on an empty database, it returns the system join relationships (shown
below for 9.
0
devel). Note that unexpected matches may indicate bogus entries
below for 9.
1
devel). Note that unexpected matches may indicate bogus entries
in system tables --- don't accept a peculiar match without question.
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
In particular, a field shown as joining to more than one target table is
probably messed up. In 9.
0
devel, the *only* fields that should join to more
probably messed up. In 9.
1
devel, the *only* fields that should join to more
than one target are pg_description.objoid, pg_depend.objid,
than one target are pg_description.objoid, pg_depend.objid,
pg_depend.refobjid, pg_shdescription.objoid, pg_shdepend.objid, and
pg_depend.refobjid, pg_shdescription.objoid, pg_shdepend.objid, and
pg_shdepend.refobjid. (Running make_oidjoins_check is an easy way to spot
pg_shdepend.refobjid. (Running make_oidjoins_check is an easy way to spot
...
@@ -31,7 +31,7 @@ revision in the patterns of cross-links between system tables.
...
@@ -31,7 +31,7 @@ revision in the patterns of cross-links between system tables.
(Ideally we'd just regenerate the script as part of the regression
(Ideally we'd just regenerate the script as part of the regression
tests themselves, but that seems too slow...)
tests themselves, but that seems too slow...)
NOTE: in 9.
0
devel, make_oidjoins_check produces two bogus join checks:
NOTE: in 9.
1
devel, make_oidjoins_check produces two bogus join checks:
Join pg_catalog.pg_class.relfilenode => pg_catalog.pg_class.oid
Join pg_catalog.pg_class.relfilenode => pg_catalog.pg_class.oid
Join pg_catalog.pg_database.datlastsysoid => pg_catalog.pg_database.oid
Join pg_catalog.pg_database.datlastsysoid => pg_catalog.pg_database.oid
These are artifacts and should not be added to the oidjoins regress test.
These are artifacts and should not be added to the oidjoins regress test.
...
@@ -55,6 +55,7 @@ Join pg_catalog.pg_am.amendscan => pg_catalog.pg_proc.oid
...
@@ -55,6 +55,7 @@ Join pg_catalog.pg_am.amendscan => pg_catalog.pg_proc.oid
Join pg_catalog.pg_am.ammarkpos => pg_catalog.pg_proc.oid
Join pg_catalog.pg_am.ammarkpos => pg_catalog.pg_proc.oid
Join pg_catalog.pg_am.amrestrpos => pg_catalog.pg_proc.oid
Join pg_catalog.pg_am.amrestrpos => pg_catalog.pg_proc.oid
Join pg_catalog.pg_am.ambuild => pg_catalog.pg_proc.oid
Join pg_catalog.pg_am.ambuild => pg_catalog.pg_proc.oid
Join pg_catalog.pg_am.ambuildempty => pg_catalog.pg_proc.oid
Join pg_catalog.pg_am.ambulkdelete => pg_catalog.pg_proc.oid
Join pg_catalog.pg_am.ambulkdelete => pg_catalog.pg_proc.oid
Join pg_catalog.pg_am.amvacuumcleanup => pg_catalog.pg_proc.oid
Join pg_catalog.pg_am.amvacuumcleanup => pg_catalog.pg_proc.oid
Join pg_catalog.pg_am.amcostestimate => pg_catalog.pg_proc.oid
Join pg_catalog.pg_am.amcostestimate => pg_catalog.pg_proc.oid
...
@@ -64,12 +65,14 @@ Join pg_catalog.pg_amop.amoplefttype => pg_catalog.pg_type.oid
...
@@ -64,12 +65,14 @@ Join pg_catalog.pg_amop.amoplefttype => pg_catalog.pg_type.oid
Join pg_catalog.pg_amop.amoprighttype => pg_catalog.pg_type.oid
Join pg_catalog.pg_amop.amoprighttype => pg_catalog.pg_type.oid
Join pg_catalog.pg_amop.amopopr => pg_catalog.pg_operator.oid
Join pg_catalog.pg_amop.amopopr => pg_catalog.pg_operator.oid
Join pg_catalog.pg_amop.amopmethod => pg_catalog.pg_am.oid
Join pg_catalog.pg_amop.amopmethod => pg_catalog.pg_am.oid
Join pg_catalog.pg_amop.amopsortfamily => pg_catalog.pg_opfamily.oid
Join pg_catalog.pg_amproc.amprocfamily => pg_catalog.pg_opfamily.oid
Join pg_catalog.pg_amproc.amprocfamily => pg_catalog.pg_opfamily.oid
Join pg_catalog.pg_amproc.amproclefttype => pg_catalog.pg_type.oid
Join pg_catalog.pg_amproc.amproclefttype => pg_catalog.pg_type.oid
Join pg_catalog.pg_amproc.amprocrighttype => pg_catalog.pg_type.oid
Join pg_catalog.pg_amproc.amprocrighttype => pg_catalog.pg_type.oid
Join pg_catalog.pg_amproc.amproc => pg_catalog.pg_proc.oid
Join pg_catalog.pg_amproc.amproc => pg_catalog.pg_proc.oid
Join pg_catalog.pg_attribute.attrelid => pg_catalog.pg_class.oid
Join pg_catalog.pg_attribute.attrelid => pg_catalog.pg_class.oid
Join pg_catalog.pg_attribute.atttypid => pg_catalog.pg_type.oid
Join pg_catalog.pg_attribute.atttypid => pg_catalog.pg_type.oid
Join pg_catalog.pg_attribute.attcollation => pg_catalog.pg_collation.oid
Join pg_catalog.pg_cast.castsource => pg_catalog.pg_type.oid
Join pg_catalog.pg_cast.castsource => pg_catalog.pg_type.oid
Join pg_catalog.pg_cast.casttarget => pg_catalog.pg_type.oid
Join pg_catalog.pg_cast.casttarget => pg_catalog.pg_type.oid
Join pg_catalog.pg_cast.castfunc => pg_catalog.pg_proc.oid
Join pg_catalog.pg_cast.castfunc => pg_catalog.pg_proc.oid
...
@@ -80,6 +83,8 @@ Join pg_catalog.pg_class.relam => pg_catalog.pg_am.oid
...
@@ -80,6 +83,8 @@ Join pg_catalog.pg_class.relam => pg_catalog.pg_am.oid
Join pg_catalog.pg_class.reltablespace => pg_catalog.pg_tablespace.oid
Join pg_catalog.pg_class.reltablespace => pg_catalog.pg_tablespace.oid
Join pg_catalog.pg_class.reltoastrelid => pg_catalog.pg_class.oid
Join pg_catalog.pg_class.reltoastrelid => pg_catalog.pg_class.oid
Join pg_catalog.pg_class.reltoastidxid => pg_catalog.pg_class.oid
Join pg_catalog.pg_class.reltoastidxid => pg_catalog.pg_class.oid
Join pg_catalog.pg_collation.collnamespace => pg_catalog.pg_namespace.oid
Join pg_catalog.pg_collation.collowner => pg_catalog.pg_authid.oid
Join pg_catalog.pg_constraint.connamespace => pg_catalog.pg_namespace.oid
Join pg_catalog.pg_constraint.connamespace => pg_catalog.pg_namespace.oid
Join pg_catalog.pg_constraint.contypid => pg_catalog.pg_type.oid
Join pg_catalog.pg_constraint.contypid => pg_catalog.pg_type.oid
Join pg_catalog.pg_conversion.connamespace => pg_catalog.pg_namespace.oid
Join pg_catalog.pg_conversion.connamespace => pg_catalog.pg_namespace.oid
...
@@ -91,6 +96,8 @@ Join pg_catalog.pg_db_role_setting.setdatabase => pg_catalog.pg_database.oid
...
@@ -91,6 +96,8 @@ Join pg_catalog.pg_db_role_setting.setdatabase => pg_catalog.pg_database.oid
Join pg_catalog.pg_depend.classid => pg_catalog.pg_class.oid
Join pg_catalog.pg_depend.classid => pg_catalog.pg_class.oid
Join pg_catalog.pg_depend.refclassid => pg_catalog.pg_class.oid
Join pg_catalog.pg_depend.refclassid => pg_catalog.pg_class.oid
Join pg_catalog.pg_description.classoid => pg_catalog.pg_class.oid
Join pg_catalog.pg_description.classoid => pg_catalog.pg_class.oid
Join pg_catalog.pg_extension.extowner => pg_catalog.pg_authid.oid
Join pg_catalog.pg_extension.extnamespace => pg_catalog.pg_namespace.oid
Join pg_catalog.pg_index.indexrelid => pg_catalog.pg_class.oid
Join pg_catalog.pg_index.indexrelid => pg_catalog.pg_class.oid
Join pg_catalog.pg_index.indrelid => pg_catalog.pg_class.oid
Join pg_catalog.pg_index.indrelid => pg_catalog.pg_class.oid
Join pg_catalog.pg_language.lanowner => pg_catalog.pg_authid.oid
Join pg_catalog.pg_language.lanowner => pg_catalog.pg_authid.oid
...
@@ -120,6 +127,7 @@ Join pg_catalog.pg_opfamily.opfowner => pg_catalog.pg_authid.oid
...
@@ -120,6 +127,7 @@ Join pg_catalog.pg_opfamily.opfowner => pg_catalog.pg_authid.oid
Join pg_catalog.pg_proc.pronamespace => pg_catalog.pg_namespace.oid
Join pg_catalog.pg_proc.pronamespace => pg_catalog.pg_namespace.oid
Join pg_catalog.pg_proc.proowner => pg_catalog.pg_authid.oid
Join pg_catalog.pg_proc.proowner => pg_catalog.pg_authid.oid
Join pg_catalog.pg_proc.prolang => pg_catalog.pg_language.oid
Join pg_catalog.pg_proc.prolang => pg_catalog.pg_language.oid
Join pg_catalog.pg_proc.provariadic => pg_catalog.pg_type.oid
Join pg_catalog.pg_proc.prorettype => pg_catalog.pg_type.oid
Join pg_catalog.pg_proc.prorettype => pg_catalog.pg_type.oid
Join pg_catalog.pg_rewrite.ev_class => pg_catalog.pg_class.oid
Join pg_catalog.pg_rewrite.ev_class => pg_catalog.pg_class.oid
Join pg_catalog.pg_shdepend.refclassid => pg_catalog.pg_class.oid
Join pg_catalog.pg_shdepend.refclassid => pg_catalog.pg_class.oid
...
@@ -159,8 +167,9 @@ Join pg_catalog.pg_type.typmodin => pg_catalog.pg_proc.oid
...
@@ -159,8 +167,9 @@ Join pg_catalog.pg_type.typmodin => pg_catalog.pg_proc.oid
Join pg_catalog.pg_type.typmodout => pg_catalog.pg_proc.oid
Join pg_catalog.pg_type.typmodout => pg_catalog.pg_proc.oid
Join pg_catalog.pg_type.typanalyze => pg_catalog.pg_proc.oid
Join pg_catalog.pg_type.typanalyze => pg_catalog.pg_proc.oid
Join pg_catalog.pg_type.typbasetype => pg_catalog.pg_type.oid
Join pg_catalog.pg_type.typbasetype => pg_catalog.pg_type.oid
Join pg_catalog.pg_type.typcollation => pg_catalog.pg_collation.oid
---------------------------------------------------------------------------
---------------------------------------------------------------------------
Bruce Momjian (
root@candle.pha.pa
.us)
Bruce Momjian (
bruce@momjian
.us)
Updated for 7.3 by Joe Conway (mail@joeconway.com)
Updated for 7.3 by Joe Conway (mail@joeconway.com)
src/tools/findoidjoins/make_oidjoins_check
View file @
970d8a39
...
@@ -59,9 +59,9 @@ $AWK -F'[ \.]' '\
...
@@ -59,9 +59,9 @@ $AWK -F'[ \.]' '\
}
}
{
{
printf "\
printf "\
SELECT ctid, %s
\n\
SELECT ctid, %s\n\
FROM %s.%s fk
\n\
FROM %s.%s fk\n\
WHERE %s != 0 AND
\n\
WHERE %s != 0 AND\n\
NOT EXISTS(SELECT 1 FROM %s.%s pk WHERE pk.oid = fk.%s);\n",
NOT EXISTS(SELECT 1 FROM %s.%s pk WHERE pk.oid = fk.%s);\n",
$4, $2, $3, $4,
$4, $2, $3, $4,
$6, $7, $4;
$6, $7, $4;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment