Re: Duplicate Key Values
От | Ron Johnson |
---|---|
Тема | Re: Duplicate Key Values |
Дата | |
Msg-id | CANzqJaCZefaoZqJzPSFqEaRA1W-Ps5E6yNuL_PT-WxUw9x38Nw@mail.gmail.com обсуждение исходный текст |
Ответ на | Duplicate Key Values (mark bradley <markbradyju@outlook.com>) |
Ответы |
Re: Duplicate Key Values
|
Список | pgsql-general |
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@outlook.com> 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@gmail.com>
Sent: Wednesday, March 5, 2025 12:50 PM
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Duplicate Key ValuesOn Wed, Mar 5, 2025 at 12:36 PM mark bradley <markbradyju@outlook.com> 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!
Вложения
В списке pgsql-general по дате отправления: