Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
a0c12d5e
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,发现更多精彩内容 >>
提交
a0c12d5e
编写于
6月 23, 2001
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add TEMPORARY sequences and have SERIAL on a temp table have a temporary
sequence.
上级
280b5f4b
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
29 addition
and
12 deletion
+29
-12
doc/src/sgml/ref/create_sequence.sgml
doc/src/sgml/ref/create_sequence.sgml
+15
-2
src/backend/commands/sequence.c
src/backend/commands/sequence.c
+2
-1
src/backend/parser/analyze.c
src/backend/parser/analyze.c
+3
-2
src/backend/parser/gram.y
src/backend/parser/gram.y
+5
-4
src/include/nodes/parsenodes.h
src/include/nodes/parsenodes.h
+2
-1
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/preproc.y
+2
-2
未找到文件。
doc/src/sgml/ref/create_sequence.sgml
浏览文件 @
a0c12d5e
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_sequence.sgml,v 1.1
5 2000/12/08 20:06:58 tgl
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_sequence.sgml,v 1.1
6 2001/06/23 00:07:33 momjian
Exp $
Postgres documentation
-->
...
...
@@ -23,7 +23,7 @@ Postgres documentation
<date>1999-07-20</date>
</refsynopsisdivinfo>
<synopsis>
CREATE SEQUENCE <replaceable class="parameter">seqname</replaceable> [ INCREMENT <replaceable class="parameter">increment</replaceable> ]
CREATE
[ TEMPORARY | TEMP ]
SEQUENCE <replaceable class="parameter">seqname</replaceable> [ INCREMENT <replaceable class="parameter">increment</replaceable> ]
[ MINVALUE <replaceable class="parameter">minvalue</replaceable> ] [ MAXVALUE <replaceable class="parameter">maxvalue</replaceable> ]
[ START <replaceable class="parameter">start</replaceable> ] [ CACHE <replaceable class="parameter">cache</replaceable> ] [ CYCLE ]
</synopsis>
...
...
@@ -37,6 +37,19 @@ CREATE SEQUENCE <replaceable class="parameter">seqname</replaceable> [ INCREMENT
</title>
<para>
<variablelist>
<varlistentry>
<term>TEMPORARY or TEMP</term>
<listitem>
<para>
If specified, the sequence is created only for this session, and is
automatically dropped on session exit.
Existing permanent sequences with the same name are not visible
(in this session) while the temporary sequence exists.
</para>
</listitem>
</varlistentry>
<variablelist>
<varlistentry>
<term><replaceable class="parameter">seqname</replaceable></term>
...
...
src/backend/commands/sequence.c
浏览文件 @
a0c12d5e
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/sequence.c,v 1.
59 2001/06/13 21:07:12
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/sequence.c,v 1.
60 2001/06/23 00:07:34
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -161,6 +161,7 @@ DefineSequence(CreateSeqStmt *seq)
}
stmt
->
relname
=
seq
->
seqname
;
stmt
->
istemp
=
seq
->
istemp
;
stmt
->
inhRelnames
=
NIL
;
stmt
->
constraints
=
NIL
;
...
...
src/backend/parser/analyze.c
浏览文件 @
a0c12d5e
...
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.1
89 2001/06/04 23:27:23
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.1
90 2001/06/23 00:07:34
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -779,6 +779,7 @@ transformCreateStmt(ParseState *pstate, CreateStmt *stmt)
sequence
=
makeNode
(
CreateSeqStmt
);
sequence
->
seqname
=
pstrdup
(
sname
);
sequence
->
istemp
=
stmt
->
istemp
;
sequence
->
options
=
NIL
;
elog
(
NOTICE
,
"CREATE TABLE will create implicit sequence '%s' for SERIAL column '%s.%s'"
,
...
...
src/backend/parser/gram.y
浏览文件 @
a0c12d5e
...
...
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.23
1 2001/06/19 22:39:11 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.23
2 2001/06/23 00:07:34 momjian
Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
...
...
@@ -1574,11 +1574,12 @@ CreateAsElement: ColId
*
*****************************************************************************/
CreateSeqStmt: CREATE SEQUENCE relation_name OptSeqList
CreateSeqStmt: CREATE
OptTemp
SEQUENCE relation_name OptSeqList
{
CreateSeqStmt *n = makeNode(CreateSeqStmt);
n->seqname = $3;
n->options = $4;
n->istemp = $2;
n->seqname = $4;
n->options = $5;
$$ = (Node *)n;
}
;
...
...
src/include/nodes/parsenodes.h
浏览文件 @
a0c12d5e
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: parsenodes.h,v 1.13
2 2001/06/19 22:39:12 tgl
Exp $
* $Id: parsenodes.h,v 1.13
3 2001/06/23 00:07:34 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -402,6 +402,7 @@ typedef struct CreateSeqStmt
{
NodeTag
type
;
char
*
seqname
;
/* the relation to create */
bool
istemp
;
/* is this a temp sequence? */
List
*
options
;
}
CreateSeqStmt
;
...
...
src/interfaces/ecpg/preproc/preproc.y
浏览文件 @
a0c12d5e
...
...
@@ -1289,9 +1289,9 @@ CreateAsElement: ColId { $$ = $1; }
*
*****************************************************************************/
CreateSeqStmt: CREATE SEQUENCE relation_name OptSeqList
CreateSeqStmt: CREATE
OptTemp
SEQUENCE relation_name OptSeqList
{
$$ = cat_str(
3, make_str("create sequence"), $3, $4
);
$$ = cat_str(
4, make_str("create sequence"), $2, $4, $5
);
}
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录