Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
cc332d61
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,发现更多精彩内容 >>
提交
cc332d61
编写于
8月 21, 1997
作者:
V
Vadim B. Mikheev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
AttrConstr --> TupleConstr
上级
e4824629
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
36 addition
and
21 deletion
+36
-21
src/backend/access/common/tupdesc.c
src/backend/access/common/tupdesc.c
+5
-5
src/backend/commands/creatinh.c
src/backend/commands/creatinh.c
+2
-2
src/backend/utils/cache/relcache.c
src/backend/utils/cache/relcache.c
+2
-2
src/include/access/tupdesc.h
src/include/access/tupdesc.h
+27
-12
未找到文件。
src/backend/access/common/tupdesc.c
浏览文件 @
cc332d61
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.1
6 1997/08/21 03:01:15 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.1
7 1997/08/21 04:03:34 vadim
Exp $
*
* NOTES
* some of the executor utility code such as "ExecTypeFromTL" should be
...
...
@@ -119,8 +119,8 @@ CreateTupleDescCopy(TupleDesc tupdesc)
ATTRIBUTE_TUPLE_SIZE
);
}
if
(
tupdesc
->
constr
)
{
desc
->
constr
=
(
AttrConstr
*
)
palloc
(
sizeof
(
struct
attr
Constr
));
memmove
(
desc
->
constr
,
tupdesc
->
constr
,
sizeof
(
struct
attr
Constr
));
desc
->
constr
=
(
TupleConstr
*
)
palloc
(
sizeof
(
Tuple
Constr
));
memmove
(
desc
->
constr
,
tupdesc
->
constr
,
sizeof
(
Tuple
Constr
));
}
else
desc
->
constr
=
NULL
;
return
desc
;
...
...
@@ -179,7 +179,7 @@ TupleDescInitEntry(TupleDesc desc,
memset
(
att
->
attname
.
data
,
0
,
NAMEDATALEN
);
att
->
att
disbursion
=
0
;
/* dummy value */
att
->
att
nvals
=
0
;
/* dummy value */
att
->
attcacheoff
=
-
1
;
att
->
attnum
=
attributeNumber
;
...
...
@@ -387,7 +387,7 @@ BuildDescForRelation(List *schema, char *relname)
/* This is for constraints */
if
(
entry
->
is_not_null
)
{
if
(
!
desc
->
constr
)
desc
->
constr
=
(
AttrConstr
*
)
palloc
(
sizeof
(
struct
attr
Constr
));
desc
->
constr
=
(
TupleConstr
*
)
palloc
(
sizeof
(
Tuple
Constr
));
desc
->
constr
->
has_not_null
=
true
;
}
desc
->
attrs
[
attnum
-
1
]
->
attnotnull
=
entry
->
is_not_null
;
...
...
src/backend/commands/creatinh.c
浏览文件 @
cc332d61
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.1
2 1997/08/19 04:43:30
vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.1
3 1997/08/21 04:05:22
vadim Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -276,7 +276,7 @@ MergeAttributes(List *schema, List *supers)
AttributeTupleForm
attribute
=
tupleDesc
->
attrs
[
attrno
];
char
*
attributeName
;
char
*
attributeType
;
Attr
Constr
constraints
;
Tuple
Constr
constraints
;
HeapTuple
tuple
;
ColumnDef
*
def
;
TypeName
*
typename
;
...
...
src/backend/utils/cache/relcache.c
浏览文件 @
cc332d61
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.1
7 1997/08/21 01:36:09
vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.1
8 1997/08/21 04:09:51
vadim Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -500,7 +500,7 @@ RelationBuildTupleDesc(RelationBuildDescInfo buildinfo,
build_tupdesc_seq
(
buildinfo
,
relation
,
natts
);
else
{
relation
->
rd_att
->
constr
=
(
AttrConstr
*
)
palloc
(
sizeof
(
struct
attr
Constr
));
relation
->
rd_att
->
constr
=
(
TupleConstr
*
)
palloc
(
sizeof
(
Tuple
Constr
));
relation
->
rd_att
->
constr
->
num_check
=
0
;
relation
->
rd_att
->
constr
->
num_defval
=
0
;
relation
->
rd_att
->
constr
->
has_not_null
=
false
;
...
...
src/include/access/tupdesc.h
浏览文件 @
cc332d61
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: tupdesc.h,v 1.
6 1997/08/19 04:45:20
vadim Exp $
* $Id: tupdesc.h,v 1.
7 1997/08/21 04:10:25
vadim Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -17,23 +17,38 @@
#include <access/attnum.h>
#include <catalog/pg_attribute.h>
typedef
struct
attrConstr
{
/*------------------------------------------------------------------------
This structure contains flags to the constraints of a tuple
------------------------------------------------------------------------*/
bool
has_not_null
;
}
AttrConstr
;
typedef
struct
attrDefault
{
AttrNumber
adnum
;
char
*
adbin
;
char
*
adsrc
;
}
AttrDefault
;
typedef
struct
constrCheck
{
char
*
ccname
;
char
*
ccbin
;
char
*
ccsrc
;
}
ConstrCheck
;
/* This structure contains constraints of a tuple */
typedef
struct
tupleConstr
{
AttrDefault
*
defval
;
ConstrCheck
*
check
;
uint16
num_defval
;
uint16
num_check
;
bool
has_not_null
;
}
TupleConstr
;
/*
* This structure contains all information (i.e. from Classes
* pg_attribute, pg_attrdef, pg_relcheck) for a tuple.
*/
typedef
struct
tupleDesc
{
/*------------------------------------------------------------------------
This structure contains all the attribute information (i.e. from Class
pg_attribute) for a tuple.
-------------------------------------------------------------------------*/
int
natts
;
/* Number of attributes in the tuple */
AttributeTupleForm
*
attrs
;
/* attrs[N] is a pointer to the description of Attribute Number N+1. */
Attr
Constr
*
constr
;
Tuple
Constr
*
constr
;
}
*
TupleDesc
;
extern
TupleDesc
CreateTemplateTupleDesc
(
int
natts
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录