On 19 May 2015 at 17:10, Peter Geoghegan <p...@heroku.com> wrote: > On Tue, May 19, 2015 at 1:57 PM, Simon Riggs <si...@2ndquadrant.com> > wrote: > > We should allow DO UPDATE to exclude a constraint and apply a > deterministic > > order to the constraints. 1. PK if it exists. 2. Replica Identity, when > not > > PK, 3. UNIQUE constraints in name order, like triggers, so users can > define > > a default evaluation order, just like they do with triggers. > > That seems like something way worse than just allowing it for all > constraints. >
I'm talking about the evaluation order; it would still match all constraints, otherwise they wouldn't be constraints. > 2) Compatibility with MySQL > > But what you describe isn't compatible with MySQL. It's totally novel. > Upthread you said "It's trivial to modify Postgres to not require that a specific unique index be inferred, so that you can omit the inference specification for DO UPDATE just as you can for DO NOTHING. That would make it work in a similar way to MySQL" Similar is good and useful. Full compatibility is even better. -- Simon Riggs http://www.2ndQuadrant.com/ <http://www.2ndquadrant.com/> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services