Re: [HACKERS] COPY (INSERT/UPDATE/DELETE .. RETURNING ..)

2015-11-28 Thread Michael Paquier
On Sat, Nov 28, 2015 at 1:15 AM, Teodor Sigaev wrote: >> Patch is switched to "ready for committer". > > Committed, thank you Thanks. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql

Re: [HACKERS] COPY (INSERT/UPDATE/DELETE .. RETURNING ..)

2015-11-27 Thread Teodor Sigaev
Patch is switched to "ready for committer". Committed, thank you -- Teodor Sigaev E-mail: teo...@sigaev.ru WWW: http://www.sigaev.ru/ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To mak

Re: [HACKERS] COPY (INSERT/UPDATE/DELETE .. RETURNING ..)

2015-11-25 Thread Michael Paquier
On Sun, Nov 22, 2015 at 9:54 AM, Marko Tiikkaja wrote: > Attached the test case I used; removing a batch of old rows from a table > through an index. Best out of three runs, I get 13.1 seconds versus 15.0 > seconds, which should amount to an improvement of around 12.7%. Thanks for the test case.

Re: [HACKERS] COPY (INSERT/UPDATE/DELETE .. RETURNING ..)

2015-11-21 Thread Marko Tiikkaja
On 2015-11-16 08:24, Michael Paquier wrote: On Sun, Nov 1, 2015 at 2:49 AM, Marko Tiikkaja wrote: Attached is a patch for being able to do $SUBJECT without a CTE. The reasons this is better than a CTE version are: 1) It's not obvious why a CTE version works but a plain one doesn't 2) Th

Re: [HACKERS] COPY (INSERT/UPDATE/DELETE .. RETURNING ..)

2015-11-20 Thread Marko Tiikkaja
On 11/19/15 7:39 PM, Michael Paquier wrote: On Thu, Nov 19, 2015 at 9:22 PM, Marko Tiikkaja wrote: Of course, something might break if we added a new statement type which supported RETURNING, but I'm really not worried about that. I'm not dead set against adding some Assert(IsA()) calls here,

Re: [HACKERS] COPY (INSERT/UPDATE/DELETE .. RETURNING ..)

2015-11-19 Thread Michael Paquier
On Thu, Nov 19, 2015 at 9:22 PM, Marko Tiikkaja wrote: > Of course, something might break if we added a new statement type which > supported RETURNING, but I'm really not worried about that. I'm not dead > set against adding some Assert(IsA()) calls here, but I don't see the point. gram.y has a

Re: [HACKERS] COPY (INSERT/UPDATE/DELETE .. RETURNING ..)

2015-11-19 Thread Marko Tiikkaja
On 11/19/15 1:17 PM, Michael Paquier wrote: On Thu, Nov 19, 2015 at 11:04 AM, Marko Tiikkaja wrote: Further, if someone's going to add new stuff to PreparableStmt, she should probably think about whether it would make sense to add it to COPY and CTEs from day one, too, and in that case not split

Re: [HACKERS] COPY (INSERT/UPDATE/DELETE .. RETURNING ..)

2015-11-19 Thread Michael Paquier
On Thu, Nov 19, 2015 at 11:04 AM, Marko Tiikkaja wrote: > This was discussed in 2010 when CTEs got the same treatment, and I agree > with what was decided back then. If someone needs to make PreparableStmt > different from what COPY and CTEs support, we can split them up. But > they're completely

Re: [HACKERS] COPY (INSERT/UPDATE/DELETE .. RETURNING ..)

2015-11-18 Thread Marko Tiikkaja
On 2015-11-16 08:24, Michael Paquier wrote: On Sun, Nov 1, 2015 at 2:49 AM, Marko Tiikkaja wrote: Attached is a patch for being able to do $SUBJECT without a CTE. The reasons this is better than a CTE version are: 1) It's not obvious why a CTE version works but a plain one doesn't 2) Th

Re: [HACKERS] COPY (INSERT/UPDATE/DELETE .. RETURNING ..)

2015-11-15 Thread Michael Paquier
On Sun, Nov 1, 2015 at 2:49 AM, Marko Tiikkaja wrote: > Attached is a patch for being able to do $SUBJECT without a CTE. The > reasons this is better than a CTE version are: > > 1) It's not obvious why a CTE version works but a plain one doesn't > 2) This one has less overhead (I measured a ~

Re: [HACKERS] COPY (INSERT/UPDATE/DELETE .. RETURNING ..)

2015-11-01 Thread Michael Paquier
On Sun, Nov 1, 2015 at 2:49 AM, Marko Tiikkaja wrote: > I can't add this to November's commit fest, but I'm posting this anyway in > case someone is thinking about implementing this feature. Note: this one has been added to CF: https://commitfest.postgresql.org/7/414/ -- Michael -- Sent via pg

[HACKERS] COPY (INSERT/UPDATE/DELETE .. RETURNING ..)

2015-10-31 Thread Marko Tiikkaja
Hi, Attached is a patch for being able to do $SUBJECT without a CTE. The reasons this is better than a CTE version are: 1) It's not obvious why a CTE version works but a plain one doesn't 2) This one has less overhead (I measured a ~12% improvement on a not-too-unreasonable test case)