Re: Duplicate key in UUID primary key index... - Mailing list pgsql-general

From Peter J. Holzer
Subject Re: Duplicate key in UUID primary key index...
Date
Msg-id YWgAy3zeG2FOgPb2@hjp.at
Whole thread Raw
In response to RE: Duplicate key in UUID primary key index...  (Eric Tobias <ettobias@hotmail.com>)
Responses RE: Duplicate key in UUID primary key index...
List 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!"

Attachment

pgsql-general by date:

Previous
From: Dennis Schwan
Date:
Subject: RSYNC YUM Mirror for pg14 not available yet
Next
From: Cedric Rey
Date:
Subject: Certificate validity error download.postgresql.org