Re: UPSERT on view does not find constraint by name

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: UPSERT on view does not find constraint by name
Дата
Msg-id 28328.1571388145@sss.pgh.pa.us
обсуждение исходный текст
Ответ на UPSERT on view does not find constraint by name  (Jeremy Finzel <finzelj@gmail.com>)
Ответы Re: UPSERT on view does not find constraint by name  (Jeremy Finzel <finzelj@gmail.com>)
Список pgsql-hackers
Jeremy Finzel <finzelj@gmail.com> writes:
> I'm not sure if this can be considered a bug or not, but it is perhaps
> unexpected.  I found that when using a view that is simply select * from
> table, then doing INSERT ... ON CONFLICT ON CONSTRAINT constraint_name on
> that view, it does not find the constraint and errors out.  But it does
> find the constraint if one lists the columns instead.

I'm confused by this report.  The view wouldn't have any constraints,
and experimenting shows that the parser won't let you name a
constraint of the underlying table here.  So would you provide a
concrete example of what you're talking about?

            regards, tom lane



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

Предыдущее
От: John Naylor
Дата:
Сообщение: Re: generating catcache control data
Следующее
От: Michael Banck
Дата:
Сообщение: Re: [Patch] Base backups and random or zero pageheaders