Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Anssi Kääriäinen <anssi(dot)kaariainen(at)thl(dot)fi>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Kevin Grittner <kgrittn(at)ymail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Date: 2014-12-16 00:22:59
Message-ID: CAMkU=1z4EbXBW1BZQUjQKBtAed3SUwdoyCrmdzexJ7ovKsD2Pw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 8, 2014 at 8:16 PM, Peter Geoghegan <pg(at)heroku(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2014-12-16 00:30:48 REVIEW: Track TRUNCATE via pgstat
Previous Message Josh Berkus 2014-12-16 00:14:30 Re: Commitfest problems