Re: How to NOT perform an insert

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Fontenot, Paul" <Paul(dot)Fontenot(at)bannerhealth(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: How to NOT perform an insert
Date: 2003-06-18 21:36:32
Message-ID: 4466.1055972192@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Fontenot, Paul" <Paul(dot)Fontenot(at)bannerhealth(dot)com> writes:
> Can I prevent an insert based on what is in a particular field?

Yeah, a BEFORE INSERT trigger can cause the insertion to be skipped
--- just return NULL, instead of returning the row to insert as you'd
normally do.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Lynna Landstreet 2003-06-18 23:37:05 "Bad date external representation"
Previous Message Douglas Trainor 2003-06-18 21:00:36 Re: Documentation Tools