Re: [HACKERS] SQL MERGE patches for PostgreSQL Versions

2017-06-22 Thread Peter Geoghegan
On Thu, Jun 22, 2017 at 9:52 AM, Jan de Visser wrote: > I am not quite sure what you're trying to achieve, but are you aware that > pgsql 9.6 introduced the ON CONFLICT clause, which allows you to do the same > with a different syntax? > >

Re: [HACKERS] SQL MERGE patches for PostgreSQL Versions

2017-06-22 Thread Kang Yuzhe
On Thu, Jun 22, 2017 at 3:13 PM, Michael Paquier wrote: > On Thu, Jun 22, 2017 at 5:30 PM, Kang Yuzhe wrote: >> I wish I could but it's because I don't believe that I have the right >> capability to fix code conflicts. My ultimate goal is to be PG

Re: [HACKERS] SQL MERGE patches for PostgreSQL Versions

2017-06-22 Thread Kang Yuzhe
On Thu, Jun 22, 2017 at 7:52 PM, Jan de Visser wrote: > On Thursday, June 22, 2017 12:32:14 PM EDT Kang Yuzhe wrote: >> Here is a sample what I did after applying the patch. >> >> testdb=# BEGIN; >> BEGIN >> testdb=# >> testdb=# MERGE INTO Stock USING Buy ON Stock.item_id =

Re: [HACKERS] SQL MERGE patches for PostgreSQL Versions

2017-06-22 Thread Jan de Visser
On Thursday, June 22, 2017 12:32:14 PM EDT Kang Yuzhe wrote: > Here is a sample what I did after applying the patch. > > testdb=# BEGIN; > BEGIN > testdb=# > testdb=# MERGE INTO Stock USING Buy ON Stock.item_id = Buy.item_id > testdb-# WHEN MATCHED THEN UPDATE SET balance = balance + Buy.volume

Re: [HACKERS] SQL MERGE patches for PostgreSQL Versions

2017-06-22 Thread Kang Yuzhe
On Thu, Jun 22, 2017 at 3:51 PM, Peter Eisentraut wrote: > On 6/22/17 05:13, Craig Ringer wrote: >> On 22 June 2017 at 17:00, Kang Yuzhe wrote: >> >>> diff --git a/src/backend/executor/nodeModifyTable.c >>>

Re: [HACKERS] SQL MERGE patches for PostgreSQL Versions

2017-06-22 Thread Kang Yuzhe
On Thu, Jun 22, 2017 at 12:10 PM, Thomas Munro wrote: > On Thu, Jun 22, 2017 at 9:00 PM, Kang Yuzhe wrote: >> I just downloaded the patch from GSoC site. > > I just looked at > https://wiki.postgresql.org/wiki/Add_MERGE_command_GSoC_2010 and

Re: [HACKERS] SQL MERGE patches for PostgreSQL Versions

2017-06-22 Thread Peter Eisentraut
On 6/22/17 05:13, Craig Ringer wrote: > On 22 June 2017 at 17:00, Kang Yuzhe wrote: > >> diff --git a/src/backend/executor/nodeModifyTable.c >> b/src/backend/executor/nodeModifyTable.c >> index 8619ce3..e3ac758 100644 >> --- a/src/backend/executor/nodeModifyTable.c >> +++

Re: [HACKERS] SQL MERGE patches for PostgreSQL Versions

2017-06-22 Thread Michael Paquier
On Thu, Jun 22, 2017 at 5:30 PM, Kang Yuzhe wrote: > I wish I could but it's because I don't believe that I have the right > capability to fix code conflicts. My ultimate goal is to be PG hacker > like YOU. Anyway, I will consider your perspective. Nice to see such a goal,

Re: [HACKERS] SQL MERGE patches for PostgreSQL Versions

2017-06-22 Thread Craig Ringer
On 22 June 2017 at 17:00, Kang Yuzhe wrote: > diff --git a/src/backend/executor/nodeModifyTable.c > b/src/backend/executor/nodeModifyTable.c > index 8619ce3..e3ac758 100644 > --- a/src/backend/executor/nodeModifyTable.c > +++ b/src/backend/executor/nodeModifyTable.c The

Re: [HACKERS] SQL MERGE patches for PostgreSQL Versions

2017-06-22 Thread Thomas Munro
On Thu, Jun 22, 2017 at 9:00 PM, Kang Yuzhe wrote: > I just downloaded the patch from GSoC site. I just looked at https://wiki.postgresql.org/wiki/Add_MERGE_command_GSoC_2010 and saw that the file https://wiki.postgresql.org/wiki/File:Merge_v201.tar was uploaded on 24 Aug

Re: [HACKERS] SQL MERGE patches for PostgreSQL Versions

2017-06-22 Thread Kang Yuzhe
On Thu, Jun 22, 2017 at 11:23 AM, Craig Ringer wrote: > On 22 June 2017 at 16:05, Kang Yuzhe wrote: >> Dear PG hackers, >> >> First my apology if I appear to be a jerk or not following the policy. >> >> I emailed Boxuan Zhai who was in charge of the

Re: [HACKERS] SQL MERGE patches for PostgreSQL Versions

2017-06-22 Thread Kang Yuzhe
On Thu, Jun 22, 2017 at 11:16 AM, Michael Paquier wrote: > On Thu, Jun 22, 2017 at 5:05 PM, Kang Yuzhe wrote: >> First my apology if I appear to be a jerk or not following the policy. > > No problem. > >> I emailed Boxuan Zhai who was in charge

Re: [HACKERS] SQL MERGE patches for PostgreSQL Versions

2017-06-22 Thread Craig Ringer
On 22 June 2017 at 16:05, Kang Yuzhe wrote: > Dear PG hackers, > > First my apology if I appear to be a jerk or not following the policy. > > I emailed Boxuan Zhai who was in charge of the SQL Merge keyword in > 2010 of GSoC but without reply. > > I want to apply

Re: [HACKERS] SQL MERGE patches for PostgreSQL Versions

2017-06-22 Thread Michael Paquier
On Thu, Jun 22, 2017 at 5:05 PM, Kang Yuzhe wrote: > First my apology if I appear to be a jerk or not following the policy. No problem. > I emailed Boxuan Zhai who was in charge of the SQL Merge keyword in > 2010 of GSoC but without reply. > > I want to apply

[HACKERS] SQL MERGE patches for PostgreSQL Versions

2017-06-22 Thread Kang Yuzhe
Dear PG hackers, First my apology if I appear to be a jerk or not following the policy. I emailed Boxuan Zhai who was in charge of the SQL Merge keyword in 2010 of GSoC but without reply. I want to apply merge_v201.patch to specific PG version. It failed saying 1 or 2 of 5 hunk failed. My