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
e84c71b4
Commit
e84c71b4
authored
Aug 04, 2004
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update oidjoins regression test to match current catalog structure.
parent
bb892cec
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
4 deletions
+32
-4
contrib/findoidjoins/README.findoidjoins
contrib/findoidjoins/README.findoidjoins
+8
-4
src/test/regress/expected/oidjoins.out
src/test/regress/expected/oidjoins.out
+16
-0
src/test/regress/sql/oidjoins.sql
src/test/regress/sql/oidjoins.sql
+8
-0
No files found.
contrib/findoidjoins/README.findoidjoins
View file @
e84c71b4
...
...
@@ -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
7.4
). Note that unexpected matches may indicate bogus entries
below for
8.0
). 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
7.4
, the *only* fields that should join to more
probably messed up. In
8.0
, 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,11 +26,11 @@ 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
7.4
, make_oidjoins_check produces one bogus join check:
NOTE: in
8.0
, make_oidjoins_check produces one bogus join check:
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
7.4
, but it did happen before and might
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.
---------------------------------------------------------------------------
...
...
@@ -51,8 +51,10 @@ 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.amcostestimate => pg_catalog.pg_proc.oid
Join pg_catalog.pg_amop.amopclaid => pg_catalog.pg_opclass.oid
Join pg_catalog.pg_amop.amopsubtype => pg_catalog.pg_type.oid
Join pg_catalog.pg_amop.amopopr => pg_catalog.pg_operator.oid
Join pg_catalog.pg_amproc.amopclaid => pg_catalog.pg_opclass.oid
Join pg_catalog.pg_amproc.amprocsubtype => pg_catalog.pg_type.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.atttypid => pg_catalog.pg_type.oid
...
...
@@ -62,12 +64,14 @@ Join pg_catalog.pg_cast.castfunc => pg_catalog.pg_proc.oid
Join pg_catalog.pg_class.relnamespace => pg_catalog.pg_namespace.oid
Join pg_catalog.pg_class.reltype => pg_catalog.pg_type.oid
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.reltoastrelid => pg_catalog.pg_class.oid
Join pg_catalog.pg_class.reltoastidxid => pg_catalog.pg_class.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_conversion.connamespace => pg_catalog.pg_namespace.oid
Join pg_catalog.pg_conversion.conproc => pg_catalog.pg_proc.oid
Join pg_catalog.pg_database.dattablespace => pg_catalog.pg_tablespace.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_description.classoid => pg_catalog.pg_class.oid
...
...
src/test/regress/expected/oidjoins.out
View file @
e84c71b4
...
...
@@ -233,6 +233,14 @@ WHERE relam != 0 AND
------+-------
(0 rows)
SELECT ctid, reltablespace
FROM pg_catalog.pg_class fk
WHERE reltablespace != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_tablespace pk WHERE pk.oid = fk.reltablespace);
ctid | reltablespace
------+---------------
(0 rows)
SELECT ctid, reltoastrelid
FROM pg_catalog.pg_class fk
WHERE reltoastrelid != 0 AND
...
...
@@ -281,6 +289,14 @@ WHERE conproc != 0 AND
------+---------
(0 rows)
SELECT ctid, dattablespace
FROM pg_catalog.pg_database fk
WHERE dattablespace != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_tablespace pk WHERE pk.oid = fk.dattablespace);
ctid | dattablespace
------+---------------
(0 rows)
SELECT ctid, classid
FROM pg_catalog.pg_depend fk
WHERE classid != 0 AND
...
...
src/test/regress/sql/oidjoins.sql
View file @
e84c71b4
...
...
@@ -117,6 +117,10 @@ SELECT ctid, relam
FROM
pg_catalog
.
pg_class
fk
WHERE
relam
!=
0
AND
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_am
pk
WHERE
pk
.
oid
=
fk
.
relam
);
SELECT
ctid
,
reltablespace
FROM
pg_catalog
.
pg_class
fk
WHERE
reltablespace
!=
0
AND
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_tablespace
pk
WHERE
pk
.
oid
=
fk
.
reltablespace
);
SELECT
ctid
,
reltoastrelid
FROM
pg_catalog
.
pg_class
fk
WHERE
reltoastrelid
!=
0
AND
...
...
@@ -141,6 +145,10 @@ SELECT ctid, conproc
FROM
pg_catalog
.
pg_conversion
fk
WHERE
conproc
!=
0
AND
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_proc
pk
WHERE
pk
.
oid
=
fk
.
conproc
);
SELECT
ctid
,
dattablespace
FROM
pg_catalog
.
pg_database
fk
WHERE
dattablespace
!=
0
AND
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_tablespace
pk
WHERE
pk
.
oid
=
fk
.
dattablespace
);
SELECT
ctid
,
classid
FROM
pg_catalog
.
pg_depend
fk
WHERE
classid
!=
0
AND
...
...
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