Re: Duplicate key in UUID primary key index...

Поиск
Список
Период
Сортировка
От Peter J. Holzer
Тема Re: Duplicate key in UUID primary key index...
Дата
Msg-id YWgAy3zeG2FOgPb2@hjp.at
обсуждение исходный текст
Ответ на RE: Duplicate key in UUID primary key index...  (Eric Tobias <ettobias@hotmail.com>)
Ответы RE: Duplicate key in UUID primary key index...  (Eric Tobias <ettobias@hotmail.com>)
Список pgsql-general
On 2021-10-14 03:02:08 +0000, Eric Tobias wrote:
> I have a table with a UUID as the primary key field. I am using a procedure to
> insert a parent and child record and using a UUID generated by an external
> system (webhook). The UUID insert is generating a “duplicate key” error on
> insert, but when I SELECT the uuid, nothing is returned.

Are you perhaps trying to insert the same uuid twice in the same
transaction? In this case the second insert would fail causing the
whole transaction to fail and you would never see that uuid in another
session.

        hp

--
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Вложения

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

Предыдущее
От: Dennis Schwan
Дата:
Сообщение: RSYNC YUM Mirror for pg14 not available yet
Следующее
От: Cedric Rey
Дата:
Сообщение: Certificate validity error download.postgresql.org