Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
e84c71b4
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e84c71b4
编写于
8月 04, 2004
作者:
T
Tom Lane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update oidjoins regression test to match current catalog structure.
上级
bb892cec
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
32 addition
and
4 deletion
+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
未找到文件。
contrib/findoidjoins/README.findoidjoins
浏览文件 @
e84c71b4
...
@@ -7,10 +7,10 @@ anything but an empty database, such as template1; else it's likely to
...
@@ -7,10 +7,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
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 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
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
than one target are pg_description.objoid, pg_depend.objid, and
pg_depend.refobjid. (Running make_oidjoins_check is an easy way to spot
pg_depend.refobjid. (Running make_oidjoins_check is an easy way to spot
fields joining to more than one table, BTW.)
fields joining to more than one table, BTW.)
...
@@ -26,11 +26,11 @@ revision in the patterns of cross-links between system tables.
...
@@ -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
(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
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
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.
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;
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.
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
...
@@ -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.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
Join pg_catalog.pg_amop.amopclaid => pg_catalog.pg_opclass.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_amop.amopopr => pg_catalog.pg_operator.oid
Join pg_catalog.pg_amproc.amopclaid => pg_catalog.pg_opclass.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_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
...
@@ -62,12 +64,14 @@ Join pg_catalog.pg_cast.castfunc => pg_catalog.pg_proc.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.relnamespace => pg_catalog.pg_namespace.oid
Join pg_catalog.pg_class.reltype => pg_catalog.pg_type.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.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.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_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
Join pg_catalog.pg_conversion.conproc => pg_catalog.pg_proc.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.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
...
...
src/test/regress/expected/oidjoins.out
浏览文件 @
e84c71b4
...
@@ -233,6 +233,14 @@ WHERE relam != 0 AND
...
@@ -233,6 +233,14 @@ WHERE relam != 0 AND
------+-------
------+-------
(0 rows)
(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
SELECT ctid, reltoastrelid
FROM pg_catalog.pg_class fk
FROM pg_catalog.pg_class fk
WHERE reltoastrelid != 0 AND
WHERE reltoastrelid != 0 AND
...
@@ -281,6 +289,14 @@ WHERE conproc != 0 AND
...
@@ -281,6 +289,14 @@ WHERE conproc != 0 AND
------+---------
------+---------
(0 rows)
(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
SELECT ctid, classid
FROM pg_catalog.pg_depend fk
FROM pg_catalog.pg_depend fk
WHERE classid != 0 AND
WHERE classid != 0 AND
...
...
src/test/regress/sql/oidjoins.sql
浏览文件 @
e84c71b4
...
@@ -117,6 +117,10 @@ SELECT ctid, relam
...
@@ -117,6 +117,10 @@ SELECT ctid, relam
FROM
pg_catalog
.
pg_class
fk
FROM
pg_catalog
.
pg_class
fk
WHERE
relam
!=
0
AND
WHERE
relam
!=
0
AND
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_am
pk
WHERE
pk
.
oid
=
fk
.
relam
);
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
SELECT
ctid
,
reltoastrelid
FROM
pg_catalog
.
pg_class
fk
FROM
pg_catalog
.
pg_class
fk
WHERE
reltoastrelid
!=
0
AND
WHERE
reltoastrelid
!=
0
AND
...
@@ -141,6 +145,10 @@ SELECT ctid, conproc
...
@@ -141,6 +145,10 @@ SELECT ctid, conproc
FROM
pg_catalog
.
pg_conversion
fk
FROM
pg_catalog
.
pg_conversion
fk
WHERE
conproc
!=
0
AND
WHERE
conproc
!=
0
AND
NOT
EXISTS
(
SELECT
1
FROM
pg_catalog
.
pg_proc
pk
WHERE
pk
.
oid
=
fk
.
conproc
);
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
SELECT
ctid
,
classid
FROM
pg_catalog
.
pg_depend
fk
FROM
pg_catalog
.
pg_depend
fk
WHERE
classid
!=
0
AND
WHERE
classid
!=
0
AND
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录