public inbox for [email protected]
help / color / mirror / Atom feedFrom: Ron Johnson <[email protected]>
To: pgsql-general <[email protected]>
Subject: Re: Duplicate Key Values
Date: Wed, 5 Mar 2025 18:37:19 -0500
Message-ID: <CANzqJaCZefaoZqJzPSFqEaRA1W-Ps5E6yNuL_PT-WxUw9x38Nw@mail.gmail.com> (raw)
In-Reply-To: <SJ2PR22MB43284AE4E32208EB035F68F5BACB2@SJ2PR22MB4328.namprd22.prod.outlook.com>
References: <CH3PR22MB4312C23476C0E67F9B4C2E10BACB2@CH3PR22MB4312.namprd22.prod.outlook.com>
<CANzqJaDWzZ4O10QZi6w__N5q7gzwcZANfu0DxA7UOpFwqAqTyQ@mail.gmail.com>
<SJ2PR22MB43284AE4E32208EB035F68F5BACB2@SJ2PR22MB4328.namprd22.prod.outlook.com>
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 <[email protected]> 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 <[email protected]>
> *Sent:* Wednesday, March 5, 2025 12:50 PM
> *To:* [email protected] <
> [email protected]>
> *Subject:* Re: Duplicate Key Values
>
> On Wed, Mar 5, 2025 at 12:36 PM mark bradley <[email protected]>
> 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!
Attachments:
[image/png] image.png (39.9K, 3-image.png)
download | view image
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: Duplicate Key Values
In-Reply-To: <CANzqJaCZefaoZqJzPSFqEaRA1W-Ps5E6yNuL_PT-WxUw9x38Nw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox