Re: run check constraints only when affected columns are changed?

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: run check constraints only when affected columns are changed?
Date: 2012-01-08 21:32:41
Message-ID: 4F0A0B79.4080104@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 01/08/2012 03:42 PM, Peter Eisentraut wrote:
> 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?

triggers?

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stefan Keller 2012-01-08 21:53:45 Re: SP-GiST versus index-only scans
Previous Message Magnus Hagander 2012-01-08 21:22:08 Re: pg_basebackup option for handling symlinks