Deferrable foreign key constraints

Hi, does anyone know a way to declare deferrable foreign key constraints when defining a Postgres table using pgTable, and a way to issue SET CONSTRAINTS within a transaction when querying in Drizzle? Thanks! https://www.postgresql.org/docs/current/sql-set-constraints.html
PostgreSQL Documentation
SET CONSTRAINTS
SET CONSTRAINTS SET CONSTRAINTS — set constraint check timing for the current transaction Synopsis SET CONSTRAINTS { ALL | name …
2 Replies
kevinkusch
kevinkusch13mo ago
From what I can tell you can pass deferrable: true as config in the second arg to PgDatabase.transaction, and that will handle the transaction side. This would have no affect on FKs that have not been set to deferrable, however, and I also have not been able to find a way to set that
HAL 9000
HAL 900011mo ago
Is there any update on this? Any way toset deferrable on a unique constraint?
Want results from more Discord servers?
Add your server