Re: [HACKERS] Another oddity in handling of WCO constraints inpostgres_fdw - Mailing list pgsql-hackers

From Etsuro Fujita
Subject Re: [HACKERS] Another oddity in handling of WCO constraints inpostgres_fdw
Date
Msg-id 9b736946-253e-2591-4139-bdd8a321973f@lab.ntt.co.jp
Whole thread Raw
In response to Re: [HACKERS] Another oddity in handling of WCO constraints inpostgres_fdw  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
List pgsql-hackers
On 2017/10/05 20:06, Kyotaro HORIGUCHI wrote:
> Since WCO ensures finally inserted values, we can't do other than
> acturally requesting for the values.

I think so too.

> So just merging WCO columns
> to RETURNING in deparsed query is ok. But can't we concatenate
> returningList and withCheckOptionList at more higher level?
> Specifically, just passing calculated used_attr to
> deparse(Insert|Update)Sql instead of returningList and
> withCheckOptionList separately.  Deparsed queries anyway forget
> the origin of requested columns.

We could do that, but I think that would need a bit more code to 
postgresPlanForeignModify including changes to the deparseDeleteSql API 
in addition to the deparse(Insert|Update)Sql APIs.  I prefer making high 
level functions simple, so I'd vote for just passing withCheckOptionList 
separately to deparse(Insert|Update)Sql, as proposed in the patch.

Best regards,
Etsuro Fujita



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Amit Khandekar
Date:
Subject: Re: [HACKERS] Parallel Append implementation
Next
From: Ashutosh Bapat
Date:
Subject: Re: [HACKERS] Partition-wise join for join between (declaratively)partitioned tables