Unable to specify parameters when CREATE SEQUENCE

PostgreSQL - related issues
Post Reply
petr.fedorov
Posts: 32
Joined: Sun Aug 19, 2012 8:57 am
Location: Russia

Unable to specify parameters when CREATE SEQUENCE

Post by petr.fedorov » Sun Feb 24, 2013 6:06 am

Hello,
CREATE SEQUENCE command has the following parameters in PostgreSQL 9 which can not be specified when create sequence in DbSchema:

1. increment

The optional clause INCREMENT BY increment specifies which value is added to the current sequence value to create a new value. A positive value will make an ascending sequence, a negative one a descending sequence. The default value is 1.

2. minvalue NO MINVALUE
The optional clause MINVALUE minvalue determines the minimum value a sequence can generate. If this clause is not supplied or NO MINVALUE is specified, then defaults will be used. The defaults are 1 and -263-1 for ascending and descending sequences, respectively.

3. maxvalue NO MAXVALUE
The optional clause MAXVALUE maxvalue determines the maximum value for the sequence. If this clause is not supplied or NO MAXVALUE is specified, then default values will be used. The defaults are 263-1 and -1 for ascending and descending sequences, respectively.

4. cache
The optional clause CACHE cache specifies how many sequence numbers are to be preallocated and stored in memory for faster access. The minimum value is 1 (only one value can be generated at a time, i.e., no cache), and this is also the default.

5. CYCLE NO CYCLE
The CYCLE option allows the sequence to wrap around when the maxvalue or minvalue has been reached by an ascending or descending sequence respectively. If the limit is reached, the next number generated will be the minvalue or maxvalue, respectively.

If NO CYCLE is specified, any calls to nextval after the sequence has reached its maximum value will return an error. If neither CYCLE or NO CYCLE are specified, NO CYCLE is the default.

The reference to PostgreSQL documentation: http://www.postgresql.org/docs/9.1/inte ... uence.html

Please add them to creation and to reverse engineering.

donose.mihai
Posts: 470
Joined: Thu Apr 07, 2011 11:05 am

Re: Unable to specify parameters when CREATE SEQUENCE

Post by donose.mihai » Mon Feb 25, 2013 6:24 am

Hello,

Opened a feature request ticket ID: 0001460

Regards,

Mihai

peleus
Posts: 54
Joined: Fri Nov 09, 2012 3:43 pm

Re: Unable to specify parameters when CREATE SEQUENCE

Post by peleus » Sat Apr 13, 2013 7:38 pm

Hi. Any news onto how this was resolved please?

netinho
Posts: 3
Joined: Thu Dec 26, 2013 3:30 pm
Location: Brazil
Contact:

Re: Unable to specify parameters when CREATE SEQUENCE

Post by netinho » Thu Dec 26, 2013 3:39 pm

We need to add the sequence to a field table to!!! Using something like DEFAULT nextval().

donose.mihai
Posts: 470
Joined: Thu Apr 07, 2011 11:05 am

Re: Unable to specify parameters when CREATE SEQUENCE

Post by donose.mihai » Sat Dec 28, 2013 9:31 am

Note added to the issue 0001460

sagumy
Posts: 1
Joined: Tue Jul 10, 2018 5:33 am

Re: Unable to specify parameters when CREATE SEQUENCE

Post by sagumy » Tue Jul 10, 2018 5:36 am

thanku
Creators of the sequences while working on projects often face problems that could be handling with use of latest tools. Submitting of papers is easy because pay to write my paper on online sites provide lots of benefits to me.

Post Reply