Quantcast

Postgresql serial data type as primary key

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Postgresql serial data type as primary key

twchiam
Hi,

Since most of the databases in the market support much bigger capacity than integer, Is there any specific reason to use serial as a primary key data type instead of big serial or big int? I foresee there will be an issue in future when id exceeded the max value of serial data type 2147483647. Furthermore, serial data type does not allows negative values.

Is there any plan to switch the primary key data type to big serial or big int data type?
Or I can just change the data type straight away (but it depends on what the scala or java primitive data type use in orbeon)?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Postgresql serial data type as primary key

Alessandro  Vernet
Administrator
Hi,

I imagine you're referring to the `id` column of `orbeon_form_data`. No particular reason, I would say. Are you thinking of having more than 2 billion forms submitted on your system? ;)

https://github.com/orbeon/orbeon-forms/blob/master/form-runner/src/main/resources/apps/fr/persistence/relational/ddl/postgresql-2016_2.sql

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Loading...