Re: [PATCH] SQL assertions prototype

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] SQL assertions prototype
Date: 2013-11-26 18:42:16
Message-ID: 5294EB88.50802@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/24/13, 10:03 AM, Simon Riggs wrote:
> So we'd need to get access to the changed rows, rather than
> re-executing a huge SQL command that re-checks every row of the table.
> That last point will make it unusable for sensible amounts of data.

SQL assertions work with arbitrary expressions. So even if you had the
changed rows, you couldn't do anything with them in general. For cases
where it makes sense to consider the changed rows, you probably want a
per-table trigger or an exclusion constraint or perhaps an auto-updated
materialized view. Then again, we have lots of ways to make queries
fast even for large tables.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2013-11-26 18:50:37 Re: pre-commit triggers
Previous Message Alvaro Herrera 2013-11-26 18:36:12 Re: Cleaner build output when not much has changed