Re: Check whether a NOT NULL check constraint has been validated

2025-12-01 Thread Stuart Campbell
Hi Adrian, > Now I am not sure what you did. > > Are you saying you used a CHECK constraint to check for NULL values? That's right. Something like: ALTER TABLE foo ADD CONSTRAINT bar_not_null CHECK (bar IS NOT NULL) NOT VALID > If so then pg_constraint.convalidated would work. You're rig

Re: Check whether a NOT NULL check constraint has been validated

2025-11-30 Thread Adrian Klaver
On 11/30/25 19:07, Adrian Klaver wrote: On 11/30/25 16:59, Stuart Campbell wrote: Hello, I have several NOT NULL check constraints in my schema that were originally added as NOT VALID. I would like to determine whether they have all since been validated, or not. I thought maybe pg_constrain

Re: Check whether a NOT NULL check constraint has been validated

2025-11-30 Thread Adrian Klaver
On 11/30/25 16:59, Stuart Campbell wrote: Hello, I have several NOT NULL check constraints in my schema that were originally added as NOT VALID. I would like to determine whether they have all since been validated, or not. I thought maybe pg_constraint.convalidated might help, but it seems l

Check whether a NOT NULL check constraint has been validated

2025-11-30 Thread Stuart Campbell
Hello, I have several NOT NULL check constraints in my schema that were originally added as NOT VALID. I would like to determine whether they have all since been validated, or not. I thought maybe pg_constraint.convalidated might help, but it seems like the version of Postgres I'm using (16) does