Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
eba41848
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,发现更多精彩内容 >>
提交
eba41848
编写于
7月 04, 1999
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Clarify maximum tuple and max attribute lengths.
上级
b31aa64f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
18 addition
and
16 deletion
+18
-16
src/backend/parser/gram.y
src/backend/parser/gram.y
+3
-3
src/backend/utils/adt/varchar.c
src/backend/utils/adt/varchar.c
+9
-9
src/include/access/htup.h
src/include/access/htup.h
+4
-2
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/preproc.y
+2
-2
未找到文件。
src/backend/parser/gram.y
浏览文件 @
eba41848
...
...
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.8
5 1999/07/03 00:32:44
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.8
6 1999/07/04 04:55:59
momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
...
...
@@ -3385,9 +3385,9 @@ Character: character '(' Iconst ')'
if ($3 < 1)
elog(ERROR,"length for '%s' type must be at least 1",$1);
else if ($3 > Max
Tuple
Size)
else if ($3 > Max
Attr
Size)
elog(ERROR,"length for type '%s' cannot exceed %d",$1,
Max
Tuple
Size);
Max
Attr
Size);
/* we actually implement this sort of like a varlen, so
* the first 4 bytes is the length. (the difference
...
...
src/backend/utils/adt/varchar.c
浏览文件 @
eba41848
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.4
7 1999/07/03 00:32:5
0 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.4
8 1999/07/04 04:56:0
0 momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -82,9 +82,9 @@ bpcharin(char *s, int dummy, int32 atttypmod)
else
len
=
atttypmod
-
VARHDRSZ
;
if
(
len
>
Max
Tuple
Size
)
if
(
len
>
Max
Attr
Size
)
elog
(
ERROR
,
"bpcharin: length of char() must be less than %d"
,
Max
Tuple
Size
);
Max
Attr
Size
);
result
=
(
char
*
)
palloc
(
atttypmod
);
VARSIZE
(
result
)
=
atttypmod
;
...
...
@@ -153,9 +153,9 @@ bpchar(char *s, int32 len)
rlen
=
len
-
VARHDRSZ
;
if
(
rlen
>
Max
Tuple
Size
)
if
(
rlen
>
Max
Attr
Size
)
elog
(
ERROR
,
"bpchar: length of char() must be less than %d"
,
Max
Tuple
Size
);
Max
Attr
Size
);
#ifdef STRINGDEBUG
printf
(
"bpchar- convert string length %d (%d) ->%d (%d)
\n
"
,
...
...
@@ -335,9 +335,9 @@ varcharin(char *s, int dummy, int32 atttypmod)
if
(
atttypmod
!=
-
1
&&
len
>
atttypmod
)
len
=
atttypmod
;
/* clip the string at max length */
if
(
len
>
Max
Tuple
Size
)
if
(
len
>
Max
Attr
Size
)
elog
(
ERROR
,
"varcharin: length of char() must be less than %d"
,
Max
Tuple
Size
);
Max
Attr
Size
);
result
=
(
char
*
)
palloc
(
len
);
VARSIZE
(
result
)
=
len
;
...
...
@@ -407,9 +407,9 @@ varchar(char *s, int32 slen)
len
=
slen
-
VARHDRSZ
;
#endif
if
(
len
>
Max
Tuple
Size
)
if
(
len
>
Max
Attr
Size
)
elog
(
ERROR
,
"varchar: length of varchar() must be less than %d"
,
Max
Tuple
Size
);
Max
Attr
Size
);
result
=
(
char
*
)
palloc
(
slen
);
VARSIZE
(
result
)
=
slen
;
...
...
src/include/access/htup.h
浏览文件 @
eba41848
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: htup.h,v 1.1
8 1999/07/03 01:57:53
momjian Exp $
* $Id: htup.h,v 1.1
9 1999/07/04 04:56:01
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -56,7 +56,9 @@ typedef HeapTupleHeaderData *HeapTupleHeader;
#define MinTupleSize (DOUBLEALIGN(sizeof (PageHeaderData) + \
sizeof(HeapTupleHeaderData) + sizeof(int4)))
#define MaxTupleSize (BLCKSZ/2 - MinTupleSize)
#define MaxTupleSize (BLCKSZ - MinTupleSize)
#define MaxAttrSize (MaxTupleSize - sizeof(HeapTupleHeaderData))
#define SelfItemPointerAttributeNumber (-1)
#define ObjectIdAttributeNumber (-2)
...
...
src/interfaces/ecpg/preproc/preproc.y
浏览文件 @
eba41848
...
...
@@ -3354,8 +3354,8 @@ Character: character '(' Iconst ')'
sprintf(errortext, "length for '%s' type must be at least 1",$1);
yyerror(errortext);
}
else if (atol($3) > Max
Tuple
Size) {
sprintf(errortext, "length for type '%s' cannot exceed %d",$1,Max
Tuple
Size);
else if (atol($3) > Max
Attr
Size) {
sprintf(errortext, "length for type '%s' cannot exceed %d",$1,Max
Attr
Size);
yyerror(errortext);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录