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