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

Re: Pet Peeves?

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: Pet Peeves?
Date: 2009-02-05 19:26:48
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
Grzegorz Jaśkiewicz escribió:
> On Wed, Feb 4, 2009 at 9:09 PM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> > On Wednesday 04 February 2009 20:36:24 Grzegorz Jaśkiewicz wrote:
> >> I dream about db wide checks on tables, without need to write
> >> expensive triggers.
> >> Basically, something that would run a select query after
> >> insert/update/delete and based on result commit or rollback.
> >> unless there's something like that already in SQL (I am not aware of
> >> all features in sql2008 draft).
> >
> > Sounds like ASSERTION, standard SQL feature.  Certainly interesting.
> >
> I was sure something like that existed, but had no idea about name.
> It also shouldn't be very hard to add, me guesses.

A trivial, stupid implementation is perhaps not too difficult.  The
problem is getting the smarts right, i.e. an optimized version.  You
certainly don't want to be executing a query against a large table for
every INSERT on another one, for example; it's better if if you can
figure out when to skip it.

Alvaro Herrera                      
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to


pgsql-general by date

Next:From: Rob RichardsonDate: 2009-02-05 19:43:07
Subject: Bringing other columns along with a GROUP BY clause
Previous:From: Peter EisentrautDate: 2009-02-05 18:55:35
Subject: Re: Pet Peeves?

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