Search Postgresql Archives

Re: Could postgres12 support millions of sequences? (like 10 million)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Sat, Mar 21, 2020 at 4:37 PM Adrian Klaver <adrian.klaver@xxxxxxxxxxx> wrote:

> Anyway, It will be awesome if we have a sequence data type in a future
> version of postgresql. They will solve a lot of problems similar to this
> one.

Actually there are already two:

https://www.postgresql.org/docs/12/datatype-numeric.html#DATATYPE-SERIAL

https://www.postgresql.org/docs/12/sql-createtable.html
"
GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ ( sequence_options ) ]

     This clause creates the column as an identity column. It will have
an implicit sequence attached to it and the column in new rows will
automatically have values from the sequence assigned to it.
"

What you want is a built in method to pull from different sequences
depending on the value of another column or values from multiple columns
in the same table.

Exactly. That will work fine too.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux