Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Дата
Msg-id 20141025103810.GN1791@alvin.alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}  (Peter Geoghegan <pg@heroku.com>)
Список pgsql-hackers
Peter Geoghegan wrote:
> On Fri, Oct 24, 2014 at 4:39 PM, Petr Jelinek <petr@2ndquadrant.com> wrote:

> > Ugh, you want to auto-magically detect what value is behind the EXCLUDED
> > based on how/where it's used in the UPDATE? That seems like quite a bad
> > idea.
> 
> That's *exactly* how DEFAULT works within UPDATE targetlists. There
> might be a few more details to work out here, but not terribly many,
> and that's going to be true no matter what. 95%+ of the time, it'll
> just be "val = EXCLUDED" anyway.

Petr's thought mirrors mine.  What are you going to do the other 5% of
the time?  Is there some other way to refer to the columns of the
"excluded" row?

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Ali Akbar
Дата:
Сообщение: Re: Function array_agg(array)
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: pg_background (and more parallelism infrastructure patches)