Re: Issues with upserts

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Issues with upserts
Дата
Msg-id d03e21be-5c88-0085-e485-405d09a60727@aklaver.com
обсуждение исходный текст
Ответ на RE: Issues with upserts  (André Hänsel <andre@webkr.de>)
Список pgsql-general
On 7/13/22 07:58, André Hänsel wrote:
> Jeremy Smith wrote:

> CREATE TABLE t (
> 
>      id serial PRIMARY KEY,
> 
>      name text NOT NULL UNIQUE,
> 
>      address text NOT NULL
> 
> );

> 
> This will yield “8”, showing that new sequence numbers have been 
> generated for each attempt.
> 

If running out of id's is a concern use bigserial instead of serial as 
it uses bigint:

bigint     -9223372036854775808 to +9223372036854775807

vs

integer for serial:

integer -2147483648 to +2147483647

-- 
Adrian Klaver
adrian.klaver@aklaver.com



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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Issues with upserts
Следующее
От: Bryn Llewellyn
Дата:
Сообщение: Re: Seems to be impossible to set a NULL search_path