Re: SET syntax in INSERT

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: SET syntax in INSERT
Дата
Msg-id CAKFQuwaq--9CAwAgRvZCjwPPx4MX6CW54sSnsroNHQywFi-jqQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: SET syntax in INSERT  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: SET syntax in INSERT  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers


On Thu, Jan 14, 2016 at 1:07 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Vitaly Burovoy <vitaly.burovoy@gmail.com> writes:
> On 1/14/16, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> It's more than syntactic sugar; you are going to have to invent semantics,
>> as well, because it's less than clear what partial-field assignments
>> should do.
>>
>> Assume a table with an int-array column, and consider
>> INSERT INTO foo SET arraycol[2] = 7, arraycol[4] = 11;

> Right part is a column name, not an expression. Isn't it?
 

> You can't now do something like
> INSERT INTO foo (arraycol[2], arraycol[4]) VALUES(7, 11);

Hm ... actually, you might want to try that before opining

​So what's the problem, then?  It seems like a decision has already been made.

David J.

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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: SET syntax in INSERT
Следующее
От: Vitaly Burovoy
Дата:
Сообщение: Re: SET syntax in INSERT