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

Re: Pet Peeves?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Pet Peeves?
Date: 2009-02-06 13:53:25
Message-ID: 498C40D5.9050409@gmx.net (view raw or flat)
Thread:
Lists: pgsql-general
Alvaro Herrera wrote:
> 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.

If you do it using the constraint trigger mechanism, it would work very 
similar to foreign keys, I'd imagine.  Instead of running a query 
against the primary key table, you'd run the check constraint expression.

In response to

pgsql-general by date

Next:From: James DooleyDate: 2009-02-06 13:59:24
Subject: Searching a gin index
Previous:From: Oleg BartunovDate: 2009-02-06 12:37:54
Subject: Re: Turning off automatic ranking on words

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