Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Jeff Janes <jeff.janes@gmail.com>
From: Jeff Janes <jeff.janes@gmail.com>
To: Peter Geoghegan <pg@heroku.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Josh Berkus <josh@agliodbs.com>, Craig Ringer <craig@2ndquadrant.com>, Anssi Kääriäinen <anssi.kaariainen@thl.fi>, Simon Riggs <simon@2ndquadrant.com>, Bruce Momjian <bruce@momjian.us>, Kevin Grittner <kgrittn@ymail.com>, Andres Freund <andres@2ndquadrant.com>, Heikki Linnakangas <hlinnakangas@vmware.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2014-12-16T00:22:59Z
Lists: pgsql-hackers
On Mon, Dec 8, 2014 at 8:16 PM, Peter Geoghegan <pg@heroku.com> wrote:
>
> Attached revision, v1.6, slightly tweaks the ordering of per-statement
> trigger execution. The ordering is now explicitly documented (the html
> mirror has been updated:
>
> http://postgres-benchmarks.s3-website-us-east-1.amazonaws.com/on-conflict-docs/trigger-definition.html
> ).
>
> As always, there is a variant for each approach to value locking.
>
> This revision fixes bitrot that developed when the patchset was
> applied on master's tip, and also cleans up comments regarding how the
> parent insert carries auxiliary/child state through all stages of
> query processing. That should structure be clearer now, including how
> setrefs.c has the auxiliary/child ModifyTable use the same
> resultRelation as its parent.
>
If I build either option of the patch under MinGW, I get an error in the
grammar files related to the IGNORE reserved word.
$ (./configure --host=x86_64-w64-mingw32 --without-zlib && make && make
check) > /dev/null
In file included from ../../../src/include/parser/gramparse.h:29:0,
from gram.y:59:
../../../src/include/parser/gram.h:207:6: error: expected identifier before
numeric constant
In file included from gram.y:14366:0:
I don't get this problem on Linux.
The build chain seems to meet the specified minimum:
flex.exe 2.5.35
bison (GNU Bison) 2.4.2
This is perl, v5.8.8 built for msys-64int
It seems like IGNORE is getting replaced by the preprocessor with something
else, but I don't know how to get my hands on the intermediate file after
the preprocessor has done its thing.
Also, in both Linux and MinGW under option 1 patch I get an OID conflict on
OID 3261.
Cheers,
Jeff
Commits
-
Change the way we mark tuples as frozen.
- 37484ad2aace 9.4.0 cited
-
Add documentation for data-modifying statements in WITH clauses.
- 0ef0b3020402 9.1.0 cited