what is the right data type for unique key in postgresql DB?

Use the serial type for automatically incrementing unique ids.

If you plan to have more than two billion entries, use bigserial. serial is the PostgresSQL equivalent of MySQL’s AUTO_INCREMENT.

PostgresSQL Documentation: Numeric Types

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)