Christopher Tyler

Check for Unvalidated Database Constraints

I am not sure who I saw this on Mastodon but it was something that is quick and easy to check. Use the following:

1
2
3
4
select conrelid::regclass
      ,conname
  from pg_constraint
 where not convalidated

Nothing should be returned but if there is you know if a constraint was created without validation.

<< Previous Post

|

Next Post >>

#Til #Postgresql #Constraints #Pg_constraint #Mastodon