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
Postgres documentation
-->
-->
...
@@ -23,7 +23,7 @@ Postgres documentation
...
@@ -23,7 +23,7 @@ Postgres documentation
<date>1999-07-20</date>
<date>1999-07-20</date>
</refsynopsisdivinfo>
</refsynopsisdivinfo>
<synopsis>
<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> ]
[ 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 ]
[ START <replaceable class="parameter">start</replaceable> ] [ CACHE <replaceable class="parameter">cache</replaceable> ] [ CYCLE ]
</synopsis>
</synopsis>
...
@@ -37,6 +37,19 @@ CREATE SEQUENCE <replaceable class="parameter">seqname</replaceable> [ INCREMENT
...
@@ -37,6 +37,19 @@ CREATE SEQUENCE <replaceable class="parameter">seqname</replaceable> [ INCREMENT
</title>
</title>
<para>
<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>
<variablelist>
<varlistentry>
<varlistentry>
<term><replaceable class="parameter">seqname</replaceable></term>
<term><replaceable class="parameter">seqname</replaceable></term>
...
...
src/backend/commands/sequence.c
浏览文件 @
a0c12d5e
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* 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)
...
@@ -161,6 +161,7 @@ DefineSequence(CreateSeqStmt *seq)
}
}
stmt
->
relname
=
seq
->
seqname
;
stmt
->
relname
=
seq
->
seqname
;
stmt
->
istemp
=
seq
->
istemp
;
stmt
->
inhRelnames
=
NIL
;
stmt
->
inhRelnames
=
NIL
;
stmt
->
constraints
=
NIL
;
stmt
->
constraints
=
NIL
;
...
...
src/backend/parser/analyze.c
浏览文件 @
a0c12d5e
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
* 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)
...
@@ -779,6 +779,7 @@ transformCreateStmt(ParseState *pstate, CreateStmt *stmt)
sequence
=
makeNode
(
CreateSeqStmt
);
sequence
=
makeNode
(
CreateSeqStmt
);
sequence
->
seqname
=
pstrdup
(
sname
);
sequence
->
seqname
=
pstrdup
(
sname
);
sequence
->
istemp
=
stmt
->
istemp
;
sequence
->
options
=
NIL
;
sequence
->
options
=
NIL
;
elog
(
NOTICE
,
"CREATE TABLE will create implicit sequence '%s' for SERIAL column '%s.%s'"
,
elog
(
NOTICE
,
"CREATE TABLE will create implicit sequence '%s' for SERIAL column '%s.%s'"
,
...
@@ -2716,7 +2717,7 @@ transformAlterTableStmt(ParseState *pstate, AlterTableStmt *stmt)
...
@@ -2716,7 +2717,7 @@ transformAlterTableStmt(ParseState *pstate, AlterTableStmt *stmt)
return
qry
;
return
qry
;
}
}
/*
/*
* Transform uses of %TYPE in a statement.
* Transform uses of %TYPE in a statement.
*/
*/
static
Node
*
static
Node
*
...
...
src/backend/parser/gram.y
浏览文件 @
a0c12d5e
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
*
*
*
*
* IDENTIFICATION
* 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
* HISTORY
* AUTHOR DATE MAJOR EVENT
* AUTHOR DATE MAJOR EVENT
...
@@ -1574,11 +1574,12 @@ CreateAsElement: ColId
...
@@ -1574,11 +1574,12 @@ CreateAsElement: ColId
*
*
*****************************************************************************/
*****************************************************************************/
CreateSeqStmt: CREATE SEQUENCE relation_name OptSeqList
CreateSeqStmt: CREATE
OptTemp
SEQUENCE relation_name OptSeqList
{
{
CreateSeqStmt *n = makeNode(CreateSeqStmt);
CreateSeqStmt *n = makeNode(CreateSeqStmt);
n->seqname = $3;
n->istemp = $2;
n->options = $4;
n->seqname = $4;
n->options = $5;
$$ = (Node *)n;
$$ = (Node *)n;
}
}
;
;
...
...
src/include/nodes/parsenodes.h
浏览文件 @
a0c12d5e
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
* 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
...
@@ -402,6 +402,7 @@ typedef struct CreateSeqStmt
{
{
NodeTag
type
;
NodeTag
type
;
char
*
seqname
;
/* the relation to create */
char
*
seqname
;
/* the relation to create */
bool
istemp
;
/* is this a temp sequence? */
List
*
options
;
List
*
options
;
}
CreateSeqStmt
;
}
CreateSeqStmt
;
...
...
src/interfaces/ecpg/preproc/preproc.y
浏览文件 @
a0c12d5e
...
@@ -1289,9 +1289,9 @@ CreateAsElement: ColId { $$ = $1; }
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录