Re: INSERT ... ON CONFLICT DO SELECT [FOR ...] take 2

2025-05-12 Thread Andreas Karlsson
On 3/31/25 5:33 PM, Dean Rasheed wrote: On 3/4/25 10:24 AM, Andreas Karlsson wrote: Rebased the patch to add support for OLD.* and NEW.*. I took a closer look at this, and I have a number of comments: Thanks for taking a look and improving my patch! And thanks to Kirill too. * The changes

Re: INSERT ... ON CONFLICT DO SELECT [FOR ...] take 2

2025-04-04 Thread Dean Rasheed
> > On 3/4/25 10:24 AM, Andreas Karlsson wrote: > > Rebased the patch to add support for OLD.* and NEW.*. > I took a closer look at this, and I have a number of comments: * The changes for RLS look correct. However, in get_row_security_policies(), it's not necessary to add WCO_RLS_UPDATE_CHECK ch

Re: INSERT ... ON CONFLICT DO SELECT [FOR ...] take 2

2025-03-12 Thread Dean Rasheed
> On 3/4/25 10:24 AM, Andreas Karlsson wrote: > Rebased the patch to add support for OLD.* and NEW.*. create table t (key int primary key, val text); insert into t values (1, 'old'); insert into t values (1, 'new') on conflict (key) do select for update returning old.*, new.*; key | val | key

Re: INSERT ... ON CONFLICT DO SELECT [FOR ...] take 2

2025-03-11 Thread Kirill Reshke
On Mon, 10 Mar 2025 at 18:05, Kirill Reshke wrote: > > On Wed, 5 Mar 2025 at 07:33, Andreas Karlsson wrote: > > > > On 3/4/25 10:24 AM, Andreas Karlsson wrote: > > > Rebased the patch to add support for OLD.* and NEW.*. > > > > Apparently the CI did not like that version. > > > > Andreas > > Hi!

Re: INSERT ... ON CONFLICT DO SELECT [FOR ...] take 2

2025-03-10 Thread Kirill Reshke
On Wed, 5 Mar 2025 at 07:33, Andreas Karlsson wrote: > > On 3/4/25 10:24 AM, Andreas Karlsson wrote: > > Rebased the patch to add support for OLD.* and NEW.*. > > Apparently the CI did not like that version. > > Andreas Hi! Applied v6. 1) Should we answer INSERT 0 10 here? ``` reshke=# table tt

Re: INSERT ... ON CONFLICT DO SELECT [FOR ...] take 2

2025-03-07 Thread Joel Jacobson
On Wed, Mar 5, 2025, at 03:32, Andreas Karlsson wrote: > On 3/4/25 10:24 AM, Andreas Karlsson wrote: >> Rebased the patch to add support for OLD.* and NEW.*. > > Apparently the CI did not like that version. > > Andreas > > Attachments: > * v6-0001-Add-support-for-ON-CONFLICT-DO-SELECT-FOR.patch +1

Re: INSERT ... ON CONFLICT DO SELECT [FOR ...] take 2

2025-03-04 Thread Andreas Karlsson
On 3/4/25 10:24 AM, Andreas Karlsson wrote: Rebased the patch to add support for OLD.* and NEW.*. Apparently the CI did not like that version. Andreas From 795c78c79bc7b2dbddfa828e4c01c5641d0be272 Mon Sep 17 00:00:00 2001 From: Andreas Karlsson Date: Mon, 18 Nov 2024 00:29:15 +0100 Subject: [

Re: INSERT ... ON CONFLICT DO SELECT [FOR ...] take 2

2025-03-04 Thread Andreas Karlsson
Hi, Rebased the patch to add support for OLD.* and NEW.*. Andreas From ffa108d03455fc3d901ff32b585dd8dc62a25963 Mon Sep 17 00:00:00 2001 From: Andreas Karlsson Date: Mon, 18 Nov 2024 00:29:15 +0100 Subject: [PATCH v5] Add support for ON CONFLICT DO SELECT [ FOR ... ] Adds support for DO SELECT

Re: INSERT ... ON CONFLICT DO SELECT [FOR ...] take 2

2024-12-17 Thread Andreas Karlsson
On 12/3/24 11:24 AM, Joel Jacobson wrote: I've tested the patch successfully and also looked at the code briefly and at first glance think it looks nice and clean. Thanks for the interest! Here is an updated version which adds support for RLS. I am not 100% sure that my choices for RLS are co

Re: INSERT ... ON CONFLICT DO SELECT [FOR ...] take 2

2024-12-03 Thread Joel Jacobson
On Tue, Dec 3, 2024, at 09:52, Andreas Karlsson wrote: > Hi, > > Here is an updated version of the patch which fixes a few small bugs, > including making sure it checks the update permission plus a bug found > by Joel Jacobsson when it was called by SPI. +1 for this feature. This seems especial

Re: INSERT ... ON CONFLICT DO SELECT [FOR ...] take 2

2024-12-03 Thread Andreas Karlsson
Hi, Here is an updated version of the patch which fixes a few small bugs, including making sure it checks the update permission plus a bug found by Joel Jacobsson when it was called by SPI. Andreas From 21ccc735d9d261278564a98d8d2d8137485cd758 Mon Sep 17 00:00:00 2001 From: Andreas Karlsson