Re: ON CONFLICT DO UPDATE for partitioned tables

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: ON CONFLICT DO UPDATE for partitioned tables
Дата
Msg-id a2da1cc8-5c71-4ce0-b47a-3288131de175@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: ON CONFLICT DO UPDATE for partitioned tables  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
On 2018/04/18 0:02, Alvaro Herrera wrote:
> Amit Langote wrote:
> 
>> Attached find a patch that does that.  When working on this, I noticed
>> that when recursing for inheritance children, ATPrepAlterColumnType()
>> would use a AlterTableCmd (cmd) that's already scribbled on as if it were
>> the original.
> 
> While I agree that the code here is in poor style, there is no live bug
> here, because the only thing that is changed each time is the copy's
> cmd->def, and its value is not obtained from the scribbled 'cmd' -- it's
> obtained from the passed-in cmd->def, which is unmodified.

Ah, you're right.  The original cmd->def itself remains intact.

Thanks,
Amit



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

Предыдущее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: Problem while updating a foreign table pointing to apartitioned table on foreign server
Следующее
От: Amit Langote
Дата:
Сообщение: Re: ON CONFLICT DO UPDATE for partitioned tables