Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
c530fbfb
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,发现更多精彩内容 >>
提交
c530fbfb
编写于
3月 18, 1998
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add checks for UNION target fields, and add optional TABLE to LOCK
and SELECT manual pages and psql help.
上级
94abcc16
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
25 addition
and
10 deletion
+25
-10
src/backend/parser/parse_clause.c
src/backend/parser/parse_clause.c
+17
-2
src/bin/psql/psqlHelp.h
src/bin/psql/psqlHelp.h
+3
-3
src/man/lock.l
src/man/lock.l
+3
-3
src/man/select.l
src/man/select.l
+2
-2
未找到文件。
src/backend/parser/parse_clause.c
浏览文件 @
c530fbfb
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.1
3 1998/02/26 04:33:29
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.1
4 1998/03/18 15:47:51
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -382,11 +382,26 @@ transformUnionClause(List *unionClause, List *targetlist)
if
(
unionClause
)
{
/* recursion */
qlist
=
parse_analyze
(
unionClause
,
NULL
);
for
(
i
=
0
;
i
<
qlist
->
len
;
i
++
)
{
List
*
prev_target
=
targetlist
;
List
*
next_target
;
if
(
length
(
targetlist
)
!=
length
(
qlist
->
qtrees
[
i
]
->
targetList
))
elog
(
ERROR
,
"Each UNION query must have the same number of columns."
);
foreach
(
next_target
,
qlist
->
qtrees
[
i
]
->
targetList
)
{
if
(((
TargetEntry
*
)
lfirst
(
prev_target
))
->
resdom
->
restype
!=
((
TargetEntry
*
)
lfirst
(
next_target
))
->
resdom
->
restype
)
elog
(
ERROR
,
"Each UNION query must have identical target types."
);
prev_target
=
lnext
(
prev_target
);
}
union_list
=
lappend
(
union_list
,
qlist
->
qtrees
[
i
]);
/* we need to check return types are consistent here */
}
return
union_list
;
}
else
...
...
src/bin/psql/psqlHelp.h
浏览文件 @
c530fbfb
...
...
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: psqlHelp.h,v 1.4
0 1998/02/03 19:27:00
momjian Exp $
* $Id: psqlHelp.h,v 1.4
1 1998/03/18 15:48:26
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -252,7 +252,7 @@ static struct _helpStruct QL_HELP[] = {
"load <filename>;"
},
{
"lock"
,
"exclusive lock a table inside a transaction"
,
"lock <class_name>;"
},
"lock
[table]
<class_name>;"
},
{
"move"
,
"move an cursor position"
,
"move [forward|backward] [<number>|all] [in <cursorname>];"
},
...
...
@@ -273,7 +273,7 @@ static struct _helpStruct QL_HELP[] = {
{
"select"
,
"retrieve tuples"
,
"select [distinct on <attr>] <expr1> [as <attr1>], ... <exprN> [as <attrN>]
\n
\
\t
[into
table
<class_name>]
\n
\
\t
[into
[table]
<class_name>]
\n
\
\t
[from <from_list>]
\n
\
\t
[where <qual>]
\n
\
\t
[group by <group_list>]
\n
\
...
...
src/man/lock.l
浏览文件 @
c530fbfb
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/src/man/Attic/lock.l,v 1.
3 1998/01/28 20:44:42
momjian Exp $
.\" $Header: /cvsroot/pgsql/src/man/Attic/lock.l,v 1.
4 1998/03/18 15:48:57
momjian Exp $
.TH FETCH SQL 01/23/93 PostgreSQL PostgreSQL
.SH NAME
lock - exclusive lock a table
.SH SYNOPSIS
.nf
\fBlock\fR classname
\fBlock\fR
[\fBtable\fR]
classname
.fi
.SH DESCRIPTION
.BR lock
...
...
@@ -31,7 +31,7 @@ aquisitions and requests to not form a deadlock.
-- Proper locking to prevent deadlock
--
begin work;
lock mytable;
lock
table
mytable;
select * from mytable;
update mytable set (x = 100);
end work;
...
...
src/man/select.l
浏览文件 @
c530fbfb
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/src/man/Attic/select.l,v 1.
4 1998/01/11 22:17:5
8 momjian Exp $
.\" $Header: /cvsroot/pgsql/src/man/Attic/select.l,v 1.
5 1998/03/18 15:49:0
8 momjian Exp $
.TH SELECT SQL 11/05/95 PostgreSQL PostgreSQL
.SH NAME
select - retrieve instances from a class
...
...
@@ -9,7 +9,7 @@ select - retrieve instances from a class
\fBselect\fR [distinct]
expression1 [\fBas\fR attr_name-1]
{, expression-1 [\fBas\fR attr_name-i]}
[\fBinto\fR
\fBtable\fR
classname]
[\fBinto\fR
[\fBtable\fR]
classname]
[\fBfrom\fR from-list]
[\fBwhere\fR where-clause]
[\fBgroup by\fR attr_name1 {, attr_name-i....}]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录