Search code examples
postgresqlinheritanceconstraintsdatabase-partitioning

Table inheritance: Enforcing unique constraints across partitions?


I have a table that I would like to partition, but I don't know how to deal with the uniqueness constraints.

Is it possible to create a unique constraint across multiple child tables?


Solution

  • No, this is not currently possible. The best you can do is to create a trigger that does the verification manually.