Re: Duplicate Key Values

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: mark bradley <markbradyju(at)outlook(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Duplicate Key Values
Date: 2025-03-11 19:37:41
Message-ID: 9203d0df-0ddd-4564-a985-59bcfcf1d294@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 3/11/25 11:52, mark bradley wrote:
>
>
> there is an index on node_id as it is the Primary Key.
>
> Why do you think there is not?
>
> My mistake, I misread the output from \d dataset
>
>
>
> Can you elaborate more on point 3.
>
> Are you calling the Foreign Key relationships subclassing?
>
>
> Although I did not explicitly use Postgres to declare inheritance,
> logically speaking table /dataset/ and /processing _node/ inherit or are
> subclasses of /node/ because they are subclasses of /node/ in a dataflow
> diagram.
>
>
> In terms of keys, this is accomplished by having the /node_id/ key in
> the /node/ table appear as a foreign key and as a primary key in both
> the /dataset/ and /processing_node/ tables.

You will need to show the schema definitions for:

node
dataset
processing_node

Best to do using psql \d <table_name>

Also in from previous \d dataset there where NOT VALID FK definitions.

Did you ever run VALIDATE CONSTRAINT against them?

>
>
>
> Is there anything in Postgres log at the time you did the above that
> showed it did more then a REINDEX?
>
>
> Not that I can tell.
>
>
>
>
> Best regards,
> Mark Brady
> _amazon.com/author/markjbrady <https://amazon.com/author/markjbrady>_

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message mark bradley 2025-03-11 19:55:59 Re: Duplicate Key Values
Previous Message Ron Johnson 2025-03-11 19:34:45 Re: Moving from Linux to Linux?