Re: Precedence of a TRIGGER vs. a CHECK on a column - Mailing list pgsql-general

From Stephan Szabo
Subject Re: Precedence of a TRIGGER vs. a CHECK on a column
Date
Msg-id 20040119113338.B46565@megazone.bigpanda.com
Whole thread Raw
In response to Precedence of a TRIGGER vs. a CHECK on a column  ("ezra epstein" <ee_newsgroup_post@prajnait.com>)
Responses Re: Precedence of a TRIGGER vs. a CHECK on a column  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Sun, 11 Jan 2004, ezra epstein wrote:
> So it seems that the CHECK definied for the non_empty_name domain is being
> applied before the trigger is executed.  Yet, it seems that NON NULL
> constraints are applied after triggers get called.

I think it's that your domain constraint is being applied before the
trigger is executed and that the table constraints are being applied
after given that I get the same behavior with a domain constraint of not
null.  This makes sense (although I haven't checking the spec wording)
since the value is being coerced into the domain in order to be put into
the row that's being passed to the trigger (thus triggering the domain
constraints).

pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Integer ranges in PostgreSQL
Next
From: "Joshua D. Drake"
Date:
Subject: Re: [pgsql-advocacy] New PostgreSQL search resource