Primary key data type: integer vs identity

Поиск
Список
Период
Сортировка
От Rich Shepard
Тема Primary key data type: integer vs identity
Дата
Msg-id alpine.LNX.2.20.1904191050120.24219@salmo.appl-ecosys.com
обсуждение исходный текст
Ответы Re: Primary key data type: integer vs identity  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: Primary key data type: integer vs identity  (Michel Pelletier <pelletier.michel@gmail.com>)
Re: Primary key data type: integer vs identity  (Peter Devoy <peter@3xe.co.uk>)
Список pgsql-general
When I created the database I set primary key data types as integer; for
example:

Column    |   Type          | Collation | Nullable |  Default
--------------+-----------------------+-----------+----------+-------------
  org_id   | integer         |           | not null |
nextval('organizations_org_id_seq'::regclass)

I probably should have used the serial type, but didn't.

If it would be advisable for me to convert from integer to identity please
point me to the appropriate work flow.

Reading the CREATE TABLE pages in the manual did not give me sufficient
insights to appreciate the differences or indicate how to change the
column's data type.

Regards,

Rich



В списке pgsql-general по дате отправления:

Предыдущее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: PostgreSQL ping/pong to client
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Primary key data type: integer vs identity