> On 5 Oct 2016, at 8:11 PM, Pantelis Theodosiou wrote:
>
> This can be solved by chaining modifying CTEs.
>
> Something like this (not tested) that can work with multiple rows inserted:
Thanks for the suggestion, but it was actually slower than our current
implementation, I believe due to
This can be solved by chaining modifying CTEs.
Something like this (not tested) that can work with multiple rows inserted:
WITH
vals (bk1, bk2, other_t1_columns, other_t2_columns) AS
( VALUES (bk1val, bk2val, other_t1_values, other_t2_values),
(bk1val, bk2val, other_t1_values
Hi all
We recently moved to using 9.5 and were hoping to use the new upsert
functionality, but unfortunately it doesn’t quite do what we need.
Our setup is something like this:
CREATE TABLE t1 (
id BIGSERIAL NOT NULL PRIMARY KEY,
bk1 INT,
bk2 UUID
— other columns
);
CREATE UNIQUE INDEX