COPY (INSERT/UPDATE/DELETE .. RETURNING ..)

From: Marko Tiikkaja <marko(at)joh(dot)to>
To: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: COPY (INSERT/UPDATE/DELETE .. RETURNING ..)
Date: 2015-10-31 17:49:29
Message-ID: 5634FF29.7000000@joh.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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)

With regard to RULEs, similar restrictions apply as the ones on
data-modifying statements in WITH.

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.

.m

Attachment Content-Type Size
copy_dml_v1.patch text/x-patch 15.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2015-10-31 18:25:06 Re: [BUGS] BUG #12989: pg_size_pretty with negative values
Previous Message Julien Rouhaud 2015-10-31 17:03:58 Re: pg_stat_statements query jumbling question