1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-12 21:01:52 +03:00

Todo items:

Add ALTER SEQUENCE to modify min/max/increment/cache/cycle values

Also updated create sequence docs to mention NO MINVALUE, & NO MAXVALUE.

New Files:
doc/src/sgml/ref/alter_sequence.sgml
src/test/regress/expected/sequence.out
src/test/regress/sql/sequence.sql


ALTER SEQUENCE is NOT transactional.  It behaves similarly to setval().
It matches the proposed SQL200N spec, as well as Oracle in most ways --
Oracle lacks RESTART WITH for some strange reason.

--
Rod Taylor <rbt@rbt.ca>
This commit is contained in:
Bruce Momjian
2003-03-20 07:02:11 +00:00
parent 46bce088c1
commit 5f65225fa3
22 changed files with 631 additions and 125 deletions

View File

@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.246 2003/03/10 03:53:49 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.247 2003/03/20 07:02:08 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -2064,6 +2064,17 @@ _copyCreateSeqStmt(CreateSeqStmt *from)
return newnode;
}
static AlterSeqStmt *
_copyAlterSeqStmt(AlterSeqStmt *from)
{
AlterSeqStmt *newnode = makeNode(AlterSeqStmt);
COPY_NODE_FIELD(sequence);
COPY_NODE_FIELD(options);
return newnode;
}
static VariableSetStmt *
_copyVariableSetStmt(VariableSetStmt *from)
{
@ -2741,6 +2752,9 @@ copyObject(void *from)
case T_CreateSeqStmt:
retval = _copyCreateSeqStmt(from);
break;
case T_AlterSeqStmt:
retval = _copyAlterSeqStmt(from);
break;
case T_VariableSetStmt:
retval = _copyVariableSetStmt(from);
break;