Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
70600bd6
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,发现更多精彩内容 >>
提交
70600bd6
编写于
2月 23, 1999
作者:
T
Thomas G. Lockhart
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Clean up error messages.
上级
681c587d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
33 addition
and
33 deletion
+33
-33
src/backend/catalog/heap.c
src/backend/catalog/heap.c
+18
-18
src/backend/parser/parse_relation.c
src/backend/parser/parse_relation.c
+10
-10
src/backend/parser/parse_type.c
src/backend/parser/parse_type.c
+5
-5
未找到文件。
src/backend/catalog/heap.c
浏览文件 @
70600bd6
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.7
4 1999/02/13 23:14:55 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.7
5 1999/02/23 07:54:03 thomas
Exp $
*
*
* INTERFACE ROUTINES
...
...
@@ -197,8 +197,8 @@ heap_create(char *relname,
if
(
relname
&&
IsSystemRelationName
(
relname
)
&&
IsNormalProcessingMode
())
{
elog
(
ERROR
,
"Illegal class name: %s -- pg_
is reserved for system catalogs"
,
elog
(
ERROR
,
"Illegal class name '%s'"
"
\n\t
The 'pg_' name prefix
is reserved for system catalogs"
,
relname
);
}
...
...
@@ -427,15 +427,15 @@ CheckAttributeNames(TupleDesc tupdesc)
if
(
nameeq
(
&
(
HeapAtt
[
j
]
->
attname
),
&
(
tupdesc
->
attrs
[
i
]
->
attname
)))
{
elog
(
ERROR
,
"
create: system attribute named
\"
%s
\"
"
,
elog
(
ERROR
,
"Attribute '%s' has a name conflict"
"
\n\t
Name matches an existing system attribute
"
,
HeapAtt
[
j
]
->
attname
.
data
);
}
}
if
(
tupdesc
->
attrs
[
i
]
->
atttypid
==
UNKNOWNOID
)
{
elog
(
NOTICE
,
"
create: attribute named
\"
%s
\"
has an unknown typ
e"
,
elog
(
NOTICE
,
"Attribute '%s' has an unknown type"
"
\n\t
Relation created; continu
e"
,
tupdesc
->
attrs
[
i
]
->
attname
.
data
);
}
}
...
...
@@ -451,8 +451,7 @@ CheckAttributeNames(TupleDesc tupdesc)
if
(
nameeq
(
&
(
tupdesc
->
attrs
[
j
]
->
attname
),
&
(
tupdesc
->
attrs
[
i
]
->
attname
)))
{
elog
(
ERROR
,
"create: repeated attribute
\"
%s
\"
"
,
elog
(
ERROR
,
"Attribute '%s' is repeated"
,
tupdesc
->
attrs
[
j
]
->
attname
.
data
);
}
}
...
...
@@ -774,15 +773,16 @@ heap_create_with_catalog(char *relname,
*/
Assert
(
IsNormalProcessingMode
()
||
IsBootstrapProcessingMode
());
if
(
natts
==
0
||
natts
>
MaxHeapAttributeNumber
)
elog
(
ERROR
,
"amcreate: from 1 to %d attributes must be specified"
,
MaxHeapAttributeNumber
);
elog
(
ERROR
,
"Number of attributes is out of range"
"
\n\t
From 1 to %d attributes may be specified"
,
MaxHeapAttributeNumber
);
CheckAttributeNames
(
tupdesc
);
/* temp tables can mask non-temp tables */
if
((
!
istemp
&&
RelnameFindRelid
(
relname
))
||
(
istemp
&&
get_temp_rel_by_name
(
relname
)
!=
NULL
))
elog
(
ERROR
,
"
%s relation
already exists"
,
relname
);
elog
(
ERROR
,
"
Relation '%s'
already exists"
,
relname
);
/* invalidate cache so non-temp table is masked by temp */
if
(
istemp
)
...
...
@@ -951,7 +951,7 @@ RelationRemoveInheritance(Relation relation)
heap_endscan
(
scan
);
heap_close
(
catalogRelation
);
elog
(
ERROR
,
"
relation <%d> inherits
\"
%s
\"
"
,
elog
(
ERROR
,
"
Relation '%d' inherits '%s'
"
,
((
Form_pg_inherits
)
GETSTRUCT
(
tuple
))
->
inhrel
,
RelationGetRelationName
(
relation
));
}
...
...
@@ -1054,7 +1054,7 @@ DeleteRelationTuple(Relation rel)
if
(
!
HeapTupleIsValid
(
tup
))
{
heap_close
(
pg_class_desc
);
elog
(
ERROR
,
"
DeleteRelationTuple: %s relation nonexisten
t"
,
elog
(
ERROR
,
"
Relation '%s' does not exis
t"
,
&
rel
->
rd_rel
->
relname
);
}
...
...
@@ -1250,7 +1250,7 @@ heap_destroy_with_catalog(char *relname)
*/
rel
=
heap_openr
(
relname
);
if
(
rel
==
NULL
)
elog
(
ERROR
,
"Relation
%s Does Not Exist!
"
,
relname
);
elog
(
ERROR
,
"Relation
'%s' does not exist
"
,
relname
);
LockRelation
(
rel
,
AccessExclusiveLock
);
rid
=
rel
->
rd_id
;
...
...
@@ -1261,7 +1261,7 @@ heap_destroy_with_catalog(char *relname)
*/
/* allow temp of pg_class? Guess so. */
if
(
!
istemp
&&
IsSystemRelationName
(
RelationGetRelationName
(
rel
)
->
data
))
elog
(
ERROR
,
"
amdestroy: cannot destroy %s relation
"
,
elog
(
ERROR
,
"
System relation '%s' cannot be destroyed
"
,
&
rel
->
rd_rel
->
relname
);
/* ----------------
...
...
@@ -1505,7 +1505,7 @@ start:;
if
(
length
(
query
->
rtable
)
>
1
||
flatten_tlist
(
query
->
targetList
)
!=
NIL
)
elog
(
ERROR
,
"
DEFAULT: cannot use attribute(s)
"
);
elog
(
ERROR
,
"
Cannot use attribute(s) in DEFAULT clause
"
);
te
=
(
TargetEntry
*
)
lfirst
(
query
->
targetList
);
resdom
=
te
->
resdom
;
expr
=
te
->
expr
;
...
...
@@ -1585,7 +1585,7 @@ StoreRelCheck(Relation rel, ConstrCheck *check)
query
=
(
Query
*
)
(
queryTree_list
->
qtrees
[
0
]);
if
(
length
(
query
->
rtable
)
>
1
)
elog
(
ERROR
,
"
CHECK: only relation %.*s
can be referenced"
,
elog
(
ERROR
,
"
Only relation '%.*s'
can be referenced"
,
NAMEDATALEN
,
rel
->
rd_rel
->
relname
.
data
);
plan
=
(
Plan
*
)
lfirst
(
planTree_list
);
...
...
src/backend/parser/parse_relation.c
浏览文件 @
70600bd6
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.1
8 1999/02/21 03:49:03 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.1
9 1999/02/23 07:53:01 thomas
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -157,7 +157,7 @@ colnameRangeTableEntry(ParseState *pstate, char *colname)
{
if
(
!
pstate
->
p_is_insert
||
rte
!=
pstate
->
p_target_rangetblentry
)
elog
(
ERROR
,
"Column
%s
is ambiguous"
,
colname
);
elog
(
ERROR
,
"Column
'%s'
is ambiguous"
,
colname
);
}
else
rte_result
=
rte
;
...
...
@@ -198,7 +198,7 @@ addRangeTableEntry(ParseState *pstate,
return
(
RangeTblEntry
*
)
nth
(
rt_index
-
1
,
pstate
->
p_rtable
);
}
elog
(
ERROR
,
"Table name
%s
specified more than once"
,
refname
);
elog
(
ERROR
,
"Table name
'%s'
specified more than once"
,
refname
);
}
}
...
...
@@ -317,7 +317,7 @@ attnameAttNum(Relation rd, char *a)
return
special_attr
[
i
].
code
;
/* on failure */
elog
(
ERROR
,
"Relation
%s does not have attribute %s
"
,
elog
(
ERROR
,
"Relation
'%s' does not have attribute '%s'
"
,
RelationGetRelationName
(
rd
),
a
);
return
0
;
/* lint */
}
...
...
@@ -396,7 +396,7 @@ handleTargetColname(ParseState *pstate, char **resname,
pstate
->
p_insert_columns
=
lnext
(
pstate
->
p_insert_columns
);
}
else
elog
(
ERROR
,
"
insert:
more expressions than target columns"
);
elog
(
ERROR
,
"
INSERT has
more expressions than target columns"
);
}
if
(
pstate
->
p_is_insert
||
pstate
->
p_is_update
)
checkTargetTypes
(
pstate
,
*
resname
,
refname
,
colname
);
...
...
@@ -424,13 +424,13 @@ checkTargetTypes(ParseState *pstate, char *target_colname,
{
rte
=
colnameRangeTableEntry
(
pstate
,
colname
);
if
(
rte
==
(
RangeTblEntry
*
)
NULL
)
elog
(
ERROR
,
"
a
ttribute %s not found"
,
colname
);
elog
(
ERROR
,
"
A
ttribute %s not found"
,
colname
);
refname
=
rte
->
refname
;
}
/*
if (pstate->p_is_insert && rte == pstate->p_target_rangetblentry)
elog(ERROR, "
%s
not available in this context", colname);
elog(ERROR, "
'%s'
not available in this context", colname);
*/
resdomno_id
=
get_attnum
(
rte
->
relid
,
colname
);
attrtype_id
=
get_atttype
(
rte
->
relid
,
resdomno_id
);
...
...
@@ -460,18 +460,18 @@ checkTargetTypes(ParseState *pstate, char *target_colname,
}
#else
if
(
attrtype_id
!=
attrtype_target
)
elog
(
ERROR
,
"Type of
%s does not match target column %s
"
,
elog
(
ERROR
,
"Type of
'%s' does not match target column '%s'
"
,
colname
,
target_colname
);
if
(
attrtype_id
==
BPCHAROID
&&
get_atttypmod
(
rte
->
relid
,
resdomno_id
)
!=
get_atttypmod
(
pstate
->
p_target_relation
->
rd_id
,
resdomno_target
))
elog
(
ERROR
,
"Length of
%s is not equal to the length of target column %s
"
,
elog
(
ERROR
,
"Length of
'%s' is not equal to the length of target column '%s'
"
,
colname
,
target_colname
);
if
(
attrtype_id
==
VARCHAROID
&&
get_atttypmod
(
rte
->
relid
,
resdomno_id
)
>
get_atttypmod
(
pstate
->
p_target_relation
->
rd_id
,
resdomno_target
))
elog
(
ERROR
,
"Length of
%s is longer than length of target column %s
"
,
elog
(
ERROR
,
"Length of
'%s' is longer than length of target column '%s'
"
,
colname
,
target_colname
);
#endif
}
src/backend/parser/parse_type.c
浏览文件 @
70600bd6
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.1
8 1998/11/27 19:52:14 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.1
9 1999/02/23 07:53:01 thomas
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -51,7 +51,7 @@ typeidTypeName(Oid id)
ObjectIdGetDatum
(
id
),
0
,
0
,
0
)))
{
elog
(
ERROR
,
"
type id lookup of %u failed
"
,
id
);
elog
(
ERROR
,
"
Unable to locate type oid %u in catalog
"
,
id
);
return
NULL
;
}
typetuple
=
(
Form_pg_type
)
GETSTRUCT
(
tup
);
...
...
@@ -68,7 +68,7 @@ typeidType(Oid id)
ObjectIdGetDatum
(
id
),
0
,
0
,
0
)))
{
elog
(
ERROR
,
"
type id lookup of %u failed
"
,
id
);
elog
(
ERROR
,
"
Unable to locate type oid %u in catalog
"
,
id
);
return
NULL
;
}
return
(
Type
)
tup
;
...
...
@@ -86,7 +86,7 @@ typenameType(char *s)
if
(
!
(
tup
=
SearchSysCacheTuple
(
TYPNAME
,
PointerGetDatum
(
s
),
0
,
0
,
0
)))
elog
(
ERROR
,
"
type name lookup of %s failed
"
,
s
);
elog
(
ERROR
,
"
Unable to locate type name '%s' in catalog
"
,
s
);
return
(
Type
)
tup
;
}
...
...
@@ -217,7 +217,7 @@ typeidTypElem(Oid type_id)
return
type
->
typelem
;
}
/* Given the attribute type of an array return the a
rr
tribute type of
/* Given the attribute type of an array return the a
t
tribute type of
an element of the array */
Oid
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录