What does "and unique identifier" mean?
(Creating a Primary Key constraint automatically creates a unique no-nulls-allowed index on the column(s), so no other index is needed.)
Can you show the table definition?
Anyway, you should be able to delete one of the duplicate node_id records by specifying another column with a different value;
On Wed, Mar 5, 2025 at 6:14 PM mark bradley <markbradyju@xxxxxxxxxxx> wrote:
Hi Ron,
The key is an integer. I'm using pGAdmin4 and recently updated to the latest version.
The records are not all identical, some have NULL values of the non-key for some unknown reason. Here is a screenshot. The key is node_id, which I have specified as a key and unique identifier.
Mark Brady,
From: Ron Johnson <ronljohnsonjr@xxxxxxxxx>
Sent: Wednesday, March 5, 2025 12:50 PM
To: pgsql-general@xxxxxxxxxxxxxxxxxxxx <pgsql-general@xxxxxxxxxxxxxxxxxxxx>
Subject: Re: Duplicate Key ValuesOn Wed, Mar 5, 2025 at 12:36 PM mark bradley <markbradyju@xxxxxxxxxxx> wrote:Although I did not enter them, somehow duplicate primary key values have appeared in one of my tables.
Is it a text/varchar column? Has the distro been upgraded "recently", or maybe streamed from an older Linux system to a newer Linux system?I can't remove the offending rows because the key is a foreign key in another table.
What to do?
Are the records completely (i.e., all columns) identical?--
Death to <Redacted>, and butter sauce.Don't boil me, I'm still alive.
<Redacted> lobster!
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!