Re: Reset sequence to current maximum value of rows
От | David G. Johnston |
---|---|
Тема | Re: Reset sequence to current maximum value of rows |
Дата | |
Msg-id | CAKFQuwb-msDns_5FNvpakoW1GNksejZPApMw05eNQtuwnQiMYw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Reset sequence to current maximum value of rows (Rich Shepard <rshepard@appl-ecosys.com>) |
Ответы |
Re: Reset sequence to current maximum value of rows [RESOLVED]
|
Список | pgsql-general |
On Thu, Jun 13, 2024 at 12:57 PM Rich Shepard <rshepard@appl-ecosys.com> wrote:
INSERT into companies (company_nbr,company_name,industry,status) VALUES
(DEFAULT,'A new company name', 'Manufacturing',DEFAULT);
Yesterday, before learning to use DEFAULT for the company_nbr PK I entered
all rows using company_nbr 2342-2391. This morning, after running the
single-line INSERT command company numbers from 2341-2392 all had 'A new
company name' as the company_name.
There is no way, in the absence of a user trigger, that the above insert command changed pre-existing rows. And if you cannot reproduce the behavior you claim to have seen I will continue to just assume you have faulty memory.
David J.
В списке pgsql-general по дате отправления: