Re: Fwd: Problem with a "complex" upsert

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: Fwd: Problem with a "complex" upsert
Дата
Msg-id 2d65f4a8-9a15-7ab6-cb39-d7347deaacd5@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: Fwd: Problem with a "complex" upsert  (Peter Geoghegan <pg@bowt.ie>)
Список pgsql-bugs
On 2018/07/31 7:53, Peter Geoghegan wrote:
> On Tue, Jul 10, 2018 at 1:59 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> I tried debugging why that happens and concluded that rewriteTargetView
>>> fails to *completely* account for the fact that the view's column's may
>>> have different attribute numbers than the underlying table that the DO
>>> UPDATE action will be applied to.  Especially, even if the view's Vars are
>>> replaced with those corresponding underlying base table's columns, the
>>> TargetEntry's into which those Vars are contained are not refreshed, that
>>> is, their resnos don't match varattnos.
>>
>>> I created a patch that seems to fix the issue, which also adds a
>>> representative test in updatable_view.sql.
>>
>> Hm.  I looked at this patch a bit.  While the onConflictSet change looks
>> reasonable, I find the exclRelTlist change fishy.  Shouldn't those resnos
>> correspond to the exclRelTlist's *own* vars, independently of what is or
>> isn't in the view_targetlist?  And why is it OK to ignore failure to find
>> a match?
> 
> Any update on this, Amit? I would like to get this one out of the way soon.

This has slipped my mind.  I will look into updating the patch today.

Thanks,
Amit



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: BUG #15305: PREPARE TRANSACTION andpg_create_logical_replication_slot()
Следующее
От: Toshi Harada
Дата:
Сообщение: Re: BUG #15305: PREPARE TRANSACTION andpg_create_logical_replication_slot()