Thanks for your response.
We have a composite primary key on 3columns. We are noticing multiple rows with same values in the 3pk columns which should not happen as primary constraint is defined on them.
Also, none of the columns are null.
On Oct 28, 2022, at 10:59 AM, Samed YILDIRIM <samed@xxxxxxxxxx> wrote:
Could you please add some example lines? I need to see some examples to say something more accurate.
First of all, null != null in PostgreSQL. So, if any of those three columns is null, it means it is unique and won't violate unique constraints even if there is another row with the same values.
Another thing, if you defined a composite primary key on those 3 columns, it means that it will prevent inserting another row that has exactly the same values on those columns. If you want to keep values unique on each individual columns, you need to create 3 separate unique indexes/constraints.
Hello Admin team,
I have an issue where we are seeing duplicate data in one of the tables. The table has primary key constraint defined on 3columns and we are seeing duplicate data in these column data.
Is there any way to figure out why this could happen? Also is there a way that the primary key constraint can be disabled during inserts?? If so how can we find who disabled it? (Note that audit is not enabled for the table)