Skip site navigation (1) Skip section navigation (2)

run check constraints only when affected columns are changed?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: run check constraints only when affected columns are changed?
Date: 2012-01-08 20:42:07
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Currently, check constraints are verified whenever a table row is
updated at all.  It seems to me that we could possibly make this quite a
bit more efficient if we only ran the check constraint expression when
the update changes a column that is referenced by the constraint
expression.  Through dependency tracking, we have that information, and
we already have the catalog infrastructure to store this information
from primary and foreign keys.  We'd just need to do some tweaking in
the executor.  Any thoughts on that?  Possible pitfalls?


pgsql-hackers by date

Next:From: Peter EisentrautDate: 2012-01-08 20:48:12
Subject: psql tab completion for GRANT role
Previous:From: Dimitri FontaineDate: 2012-01-08 20:36:28
Subject: Inline Extension

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group