From: | mark bradley <markbradyju(at)outlook(dot)com> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, Ron Johnson <ronljohnsonjr(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Duplicate Key Values |
Date: | 2025-03-06 18:14:14 |
Message-ID: | SJ2PR22MB432898722A74E9B808AC4F05BACA2@SJ2PR22MB4328.namprd22.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I tried adding a dummy column with different values and then deleting one, as you suggested. Got the same message.
Mark Brady, Ph.D.
Deputy Chief Data Officer, TRMC
amazon.com/author/markjbrady<https://amazon.com/author/markjbrady>
________________________________
From: mark bradley <markbradyju(at)outlook(dot)com>
Sent: Thursday, March 6, 2025 1:11 PM
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>; Ron Johnson <ronljohnsonjr(at)gmail(dot)com>; pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Duplicate Key Values
Here is the table definition:
[cid:ecac8e92-826b-45c8-95a8-aaf0e55c4f9c]
And here is the error message I get when I try to delete a duplicate:
[cid:a0f5f298-984d-4f89-abd2-475c02e65b9d]
Mark Brady,
amazon.com/author/markjbrady<https://amazon.com/author/markjbrady>
________________________________
From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Sent: Wednesday, March 5, 2025 6:49 PM
To: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>; pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Duplicate Key Values
On 3/5/25 15:37, Ron Johnson wrote:
> 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(at)outlook(dot)com
> <mailto:markbradyju(at)outlook(dot)com>> wrote:
>
> Hi Ron,
>
> The key is an integer. I'm using pGAdmin4 and recently updated to
> the latest version.
1) Did you not see duplicates with the old version of pgAdmin4?
2) What do you see if you use psql?
3) Did you upgrade/move the Postgres server or the underlying OS?
4) Have you tried reindexing the node_id field?
>
> 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.
>
>
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Ron Johnson | 2025-03-06 18:16:56 | Re: Quesion about querying distributed databases |
Previous Message | mark bradley | 2025-03-06 18:11:15 | Re: Duplicate Key Values |