From: | Ron Johnson <ronljohnsonjr(at)gmail(dot)com> |
---|---|
To: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Duplicate Key Values |
Date: | 2025-03-05 23:37:19 |
Message-ID: | CANzqJaCZefaoZqJzPSFqEaRA1W-Ps5E6yNuL_PT-WxUw9x38Nw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)outlook(dot)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,
> *amazon.com/author/markjbrady <https://amazon.com/author/markjbrady>*
> ------------------------------
> *From:* Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
> *Sent:* Wednesday, March 5, 2025 12:50 PM
> *To:* pgsql-general(at)lists(dot)postgresql(dot)org <
> pgsql-general(at)lists(dot)postgresql(dot)org>
> *Subject:* Re: Duplicate Key Values
>
> On Wed, Mar 5, 2025 at 12:36 PM mark bradley <markbradyju(at)outlook(dot)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!
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2025-03-05 23:49:05 | Re: Duplicate Key Values |
Previous Message | Ron Johnson | 2025-03-05 17:50:13 | Re: Duplicate Key Values |