BUG #18320: Duplicate primary key records in table

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: jaihind213(at)gmail(dot)com
Subject: BUG #18320: Duplicate primary key records in table
Date: 2024-02-01 01:27:27
Message-ID: 18320-192ab7e8def42141@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 18320
Logged by: vishnu ch
Email address: jaihind213(at)gmail(dot)com
PostgreSQL version: 15.2
Operating system: aarch64-apple-darwin21.6.0
Description:

hi
i create table with primary key and inserted a few records but i am
surprised to see duplicate records having same primary key ?
is this a bug ? or am i missing something in postgres ?

i noticed other conversations/bugs like BUG #16938
---------------------
1. create table
CREATE TABLE foo (
id integer PRIMARY KEY,
name VARCHAR(255) NOT NULL
);

2. insert records:
insert into foo values (4, 'boo');
insert into foo values (6, 'asd');
insert into foo values (6, 'asd');
.....

3. select * from foo;

id|name|
--+----+
6|xxx |
5|yyy |
5|yyy |
6|xxx |
4|boo |
6|asd |
6|asd |
6|asd |
4|boo |

---------------------------------------
Other details:
1. PostgreSQL 15.2 on aarch64-apple-darwin21.6.0, compiled by Apple clang
version 14.0.0 (clang-1400.0.29.102), 64-bit
2. Using https://postgresapp.com/ to launch postgres 15 on mac m1 - macOs
Monterey

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message vishnu rao 2024-02-01 02:32:57 Re: BUG #18320: Duplicate primary key records in table
Previous Message Laurenz Albe 2024-01-31 15:52:20 Re: Cascade rules on INSERT wrong behaviour on 16.0