SELECT conname, condeferrable, condeferred FROM pg_constraint WHERE conrelid in ( 'mytable1'::regclass,'mytable2'::regclass) AND contype='f'; conname | condeferrable | condeferred ------------------------------+---------------+------------- mytable1_id_fkey | f | f mytable1_id_fkey | f | f mytable2_id_fkey | f | f
Minimalistic Oracle contains a collection of practical examples from my encounters with Oracle technologies. When relevant, I also write about other technologies, like Linux or PostgreSQL. Many of the posts starts with "how to" since they derive directly from my own personal experience. My goal is to provide simple examples, so that they can be easily adapted to other situations.
Thursday, September 25, 2025
Find out if a constraint in PostgreSQL is defined as deferrable
Logged into the relevant database, find out which FK are deferrable:
If condeferrable = t (true), the constraint is created initially deferrable
If condeferrable = f (false), like in my case, it is not.
No comments:
Post a Comment