Re: Partitioning feature ... - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Partitioning feature ...
Date
Msg-id 19670.1238518538@sss.pgh.pa.us
Whole thread Raw
In response to Re: Partitioning feature ...  (Emmanuel Cecchet <manu@asterdata.com>)
List pgsql-hackers
Emmanuel Cecchet <manu@asterdata.com> writes:
> Yes, there is a good reason. As a trigger can update the tuple value, 
> this can change the routing decision. If you have a user trigger that 
> tries to change the key value after the partition choice has been made, 
> this will lead to an integrity constraint violation which is probably 
> not what the user expects.

[ shrug... ]  Badly written user triggers can break FK constraints,
too.  We've tolerated that in the past because preventing it disables
useful capabilities.

I remain of the opinion that if you think you *have to* execute last,
you should not be writing this as a trigger; you'd be better off
embedding it lower in the system.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Euler Taveira de Oliveira
Date:
Subject: Re: can't load plpython
Next
From: Zdenek Kotala
Date:
Subject: Re: Solaris getopt_long and PostgreSQL