Re: ON CONFLICT issues around whole row vars,

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: ON CONFLICT issues around whole row vars,
Дата
Msg-id 20151003112136.GB3323@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: ON CONFLICT issues around whole row vars,  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
> My proposal in this WIP patch is to make it a bit clearer that
> 'EXCLUDED' isn't a real relation. I played around with adding a
> different rtekind, but that's too heavy a hammer. What I instead did was
> to set relkind to composite - which seems to signal pretty well that
> we're not dealing with a real relation. That immediately fixes the RLS
> issue as fireRIRrules has the following check:
>         if (rte->rtekind != RTE_RELATION ||
>             rte->relkind != RELKIND_RELATION)
>             continue;
> It also makes it relatively straightforward to fix the system column
> issue by adding an additional relkind check to scanRTEForColumn's system
> column handling.

That works, but also precludes referencing 'oid' in a WITH OIDs table
via EXCLUDED.oid - to me that looks correct since a to-be-inserted row
can't yet have an oid assigned. Differing opinions?

Greetings,

Andres Freund



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: WIP: Rework access method interface
Следующее
От: Petr Jelinek
Дата:
Сообщение: Re: WIP: Rework access method interface