1

I have inserted few rows in table using insert query using same kind of query.

Then suddenly I am getting below error every time inserting data & I have checked previous queries and both are same.

ERROR:  duplicate key value violates unique constraint "accounts_pagepermission_pkey"
DETAIL:  Key (id)=(357) already exists.
SQL state: 23505

Does any one idea what will be the reason behind this.

Jay
  • 19
  • 2
Moon
  • 4,014
  • 3
  • 30
  • 66
  • 2
    That error tells you why it cant be more clear? i advice you to research how [Unique Constraints](https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-UNIQUE-CONSTRAINTS) work .. – Raymond Nijland Oct 03 '19 at 13:06
  • Here's a [link](https://stackoverflow.com/questions/4448340/postgresql-duplicate-key-violates-unique-constraint) that might help you. – Karan Sethi Oct 03 '19 at 13:09

0 Answers0