Re: BUG #14327: UPSERT requires full path to column

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: BUG #14327: UPSERT requires full path to column
Дата
Msg-id CAM3SWZTS10xLUxOHKa-t7E-K7L7LOE2Ag4WFm-mUYOGNH1UXEQ@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #14327: UPSERT requires full path to column  (egor.pugin@gmail.com)
Ответы Re: BUG #14327: UPSERT requires full path to column
Список pgsql-bugs
On Mon, Sep 19, 2016 at 1:06 AM,  <egor.pugin@gmail.com> wrote:
> I've noticed upsert query won't work if I do not write 'schema.TABLE.column'
> instead of simple 'column' in 'on conflict do update set' query.

Use an alias. e.g.:

INSERT INTO statistics."MostPopularDependencies" as mpd ...

You can then reference columns using mpd.downloads_week, etc

--
Peter Geoghegan

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

Предыдущее
От: egor.pugin@gmail.com
Дата:
Сообщение: BUG #14327: UPSERT requires full path to column
Следующее
От: Egor Pugin
Дата:
Сообщение: Re: BUG #14327: UPSERT requires full path to column