BUG #17173: Primary Key ignored resulting in duplicate values - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #17173: Primary Key ignored resulting in duplicate values
Date
Msg-id 17173-d0151264e4a69eb5@postgresql.org
Whole thread Raw
Responses Re: BUG #17173: Primary Key ignored resulting in duplicate values  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      17173
Logged by:          Ketan Dhanjee
Email address:      kdhanjee@gmail.com
PostgreSQL version: 11.9
Operating system:   CentOS Linux 7
Description:

Dear Sir/Madam,

We have found issues on our database tables with duplicate values for tables
defined with primary keys.

Below please find output from one of our tables with duplicate values on the
primary key:

Table DDL:

CREATE TABLE component.priceupdate
(
    id bigint NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1
MINVALUE 1 MAXVALUE 9223372036854775807 CACHE 1 ),
    reference character varying(50) COLLATE pg_catalog."default",
    effectivedate timestamp(6) without time zone,
    "timestamp" timestamp(6) without time zone,
    priceupdatestatus character varying(50) COLLATE pg_catalog."default",
    modifieddate timestamp(6) without time zone,
    CONSTRAINT priceupdate_pkey PRIMARY KEY (id)
        USING INDEX TABLESPACE pgwlicsdb
)
WITH (
    OIDS = FALSE
)
TABLESPACE pgwlicsdb;

--------------------------------------------
Select output:

select * from component.priceupdate where id=3001279;

id                 |     reference           |       effectivedate
        |  timestamp                           |    priceupdatestatus
| modifieddate

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3001279        1250812673793      2021-03-18  00:00:00
2021-04-06  13:19:14.997     Failed                            2021-05-23
12:16:49.503
3001279        1250812673793      2021-03-18  00:00:00
2021-04-06  13:19:14.997     Failed                            2021-05-23
12:45:09.206

We have other tables that also have duplicates for primary key.

Could you please provide feedback with regards to my query.

Thanks
Ketan


pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #17172: NaN compare error in hash agg
Next
From: PG Bug reporting form
Date:
Subject: BUG #17174: ERROR: column "min_value" does not exist at character 19 2021-09