Difference between revisions of "Unique constraint"

From wikieduonline
Jump to navigation Jump to search
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
  ERROR:  duplicate key value violates unique constraint "YOUR_TEXT_HERE"
+
{{lc}}
 +
 
 +
  ERROR:  [[duplicate key value violates unique constraint]] "YOUR_TEXT_HERE"
 
  DETAIL: Key (id)=(XXXXXX) already exists
 
  DETAIL: Key (id)=(XXXXXX) already exists
  
  
 
[[Sonarqube]]
 
[[Sonarqube]]
  ### Error updating database.  Cause: [[org.postgresql.util.PSQLException]]: ERROR: duplicate key value violates [[unique constraint]] "[[live_measures_component]]"
+
  ### Error updating database.  Cause: [[org.postgresql.util.PSQLException]]: ERROR: [[duplicate key value violates unique constraint]] "[[live_measures_component]]"
  
 
== Related ==
 
== Related ==
[[ALTER TABLE]] tablename ADD [[CONSTRAINT]] constraintname UNIQUE (columns);
+
* [[ALTER TABLE]] tablename ADD [[CONSTRAINT]] constraintname UNIQUE (columns);
[[duplicated keys]]
+
* [[duplicated keys]]
 +
* [[Foreign Keys]]
 +
* [[Locking]]
 +
 
 +
== Activities ==
 +
* Read https://aws.amazon.com/blogs/database/hidden-dangers-of-duplicate-key-violations-in-postgresql-and-how-to-avoid-them/
  
 
== See also ==
 
== See also ==
* {{PostgreSQL}}
+
* {{Locking}}
 
* {{SQL}}
 
* {{SQL}}
  
 
[[Category:SQL]]
 
[[Category:SQL]]

Latest revision as of 10:43, 11 July 2023

Advertising: