Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
0a8fb5a8
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,发现更多精彩内容 >>
提交
0a8fb5a8
编写于
5月 19, 1999
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Upgrade to PyGreSQL (2.4)
上级
9487ad84
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
22 addition
and
14 deletion
+22
-14
src/backend/catalog/heap.c
src/backend/catalog/heap.c
+18
-5
src/backend/nodes/outfuncs.c
src/backend/nodes/outfuncs.c
+1
-5
src/backend/nodes/read.c
src/backend/nodes/read.c
+2
-2
src/backend/parser/parse_coerce.c
src/backend/parser/parse_coerce.c
+1
-2
未找到文件。
src/backend/catalog/heap.c
浏览文件 @
0a8fb5a8
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.8
0 1999/05/13 07:28:26 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.8
1 1999/05/19 16:46:10 momjian
Exp $
*
*
*
*
* INTERFACE ROUTINES
* INTERFACE ROUTINES
...
@@ -1514,7 +1514,7 @@ StoreAttrDefault(Relation rel, AttrDefault *attrdef)
...
@@ -1514,7 +1514,7 @@ StoreAttrDefault(Relation rel, AttrDefault *attrdef)
char
nulls
[
4
]
=
{
' '
,
' '
,
' '
,
' '
};
char
nulls
[
4
]
=
{
' '
,
' '
,
' '
,
' '
};
extern
GlobalMemory
CacheCxt
;
extern
GlobalMemory
CacheCxt
;
start:
;
start:
/* Surround table name with double quotes to allow mixed-case and
/* Surround table name with double quotes to allow mixed-case and
* whitespaces in names. - BGA 1998-11-14
* whitespaces in names. - BGA 1998-11-14
*/
*/
...
@@ -1537,7 +1537,21 @@ start:;
...
@@ -1537,7 +1537,21 @@ start:;
if
(
type
!=
atp
->
atttypid
)
if
(
type
!=
atp
->
atttypid
)
{
{
if
(
IS_BINARY_COMPATIBLE
(
type
,
atp
->
atttypid
))
/*
* Though these types are binary compatible, bpchar has a fixed
* length on the disk, requiring non-bpchar types to be padded
* before storage in the default table. bjm 1999/05/18
*/
if
(
atp
->
atttypid
==
BPCHAROID
&&
(
type
==
TEXTOID
||
type
==
BPCHAROID
||
type
==
UNKNOWNOID
))
{
if
(
can_coerce_type
(
1
,
&
(
type
),
&
(
atp
->
atttypid
)))
expr
=
coerce_type
(
NULL
,
(
Node
*
)
expr
,
type
,
atp
->
atttypid
);
else
elog
(
ERROR
,
"DEFAULT clause const type '%s' can not be converted to char()."
,
typeidTypeName
(
type
));
}
else
if
(
IS_BINARY_COMPATIBLE
(
type
,
atp
->
atttypid
))
;
/* use without change */
;
/* use without change */
else
if
(
can_coerce_type
(
1
,
&
(
type
),
&
(
atp
->
atttypid
)))
else
if
(
can_coerce_type
(
1
,
&
(
type
),
&
(
atp
->
atttypid
)))
expr
=
coerce_type
(
NULL
,
(
Node
*
)
expr
,
type
,
atp
->
atttypid
);
expr
=
coerce_type
(
NULL
,
(
Node
*
)
expr
,
type
,
atp
->
atttypid
);
...
@@ -1556,8 +1570,7 @@ start:;
...
@@ -1556,8 +1570,7 @@ start:;
adbin
=
nodeToString
(
expr
);
adbin
=
nodeToString
(
expr
);
oldcxt
=
MemoryContextSwitchTo
((
MemoryContext
)
CacheCxt
);
oldcxt
=
MemoryContextSwitchTo
((
MemoryContext
)
CacheCxt
);
attrdef
->
adbin
=
(
char
*
)
palloc
(
strlen
(
adbin
)
+
1
);
attrdef
->
adbin
=
pstrdup
(
adbin
);
strcpy
(
attrdef
->
adbin
,
adbin
);
(
void
)
MemoryContextSwitchTo
(
oldcxt
);
(
void
)
MemoryContextSwitchTo
(
oldcxt
);
pfree
(
adbin
);
pfree
(
adbin
);
...
...
src/backend/nodes/outfuncs.c
浏览文件 @
0a8fb5a8
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: outfuncs.c,v 1.8
3 1999/05/18 21:34:28 tgl
Exp $
* $Id: outfuncs.c,v 1.8
4 1999/05/19 16:46:11 momjian
Exp $
*
*
* NOTES
* NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which
* Every (plan) node in POSTGRES has an associated "out" routine which
...
@@ -1203,18 +1203,14 @@ _outDatum(StringInfo str, Datum value, Oid type)
...
@@ -1203,18 +1203,14 @@ _outDatum(StringInfo str, Datum value, Oid type)
s
=
(
char
*
)
(
&
value
);
s
=
(
char
*
)
(
&
value
);
appendStringInfo
(
str
,
" %d [ "
,
length
);
appendStringInfo
(
str
,
" %d [ "
,
length
);
for
(
i
=
0
;
i
<
sizeof
(
Datum
);
i
++
)
for
(
i
=
0
;
i
<
sizeof
(
Datum
);
i
++
)
{
appendStringInfo
(
str
,
" %d "
,
(
int
)
(
s
[
i
]));
appendStringInfo
(
str
,
" %d "
,
(
int
)
(
s
[
i
]));
}
appendStringInfo
(
str
,
"] "
);
appendStringInfo
(
str
,
"] "
);
}
}
else
else
{
/* !byValue */
{
/* !byValue */
s
=
(
char
*
)
DatumGetPointer
(
value
);
s
=
(
char
*
)
DatumGetPointer
(
value
);
if
(
!
PointerIsValid
(
s
))
if
(
!
PointerIsValid
(
s
))
{
appendStringInfo
(
str
,
" 0 [ ] "
);
appendStringInfo
(
str
,
" 0 [ ] "
);
}
else
else
{
{
/*
/*
...
...
src/backend/nodes/read.c
浏览文件 @
0a8fb5a8
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.1
4 1999/02/13 23:16:0
1 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.1
5 1999/05/19 16:46:1
1 momjian Exp $
*
*
* HISTORY
* HISTORY
* AUTHOR DATE MAJOR EVENT
* AUTHOR DATE MAJOR EVENT
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
/*
/*
* stringToNode -
* stringToNode -
* returns a Node with a given legal
ascii
representation
* returns a Node with a given legal
ASCII
representation
*/
*/
void
*
void
*
stringToNode
(
char
*
str
)
stringToNode
(
char
*
str
)
...
...
src/backend/parser/parse_coerce.c
浏览文件 @
0a8fb5a8
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.1
2 1999/05/10 00:45:26
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.1
3 1999/05/19 16:46:12
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -75,7 +75,6 @@ coerce_type(ParseState *pstate, Node *node, Oid inputTypeId, Oid targetTypeId)
...
@@ -75,7 +75,6 @@ coerce_type(ParseState *pstate, Node *node, Oid inputTypeId, Oid targetTypeId)
*/
*/
else
if
(
inputTypeId
!=
UNKNOWNOID
)
else
if
(
inputTypeId
!=
UNKNOWNOID
)
{
{
/*
/*
* We already know there is a function which will do this, so
* We already know there is a function which will do this, so
* let's use it
* let's use it
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录