From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Marko Tiikkaja <marko(at)joh(dot)to>, Vitaly Burovoy <vitaly(dot)burovoy(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: SET syntax in INSERT |
Date: | 2016-01-14 20:14:58 |
Message-ID: | 569801C2.8070406@dunslane.net |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 01/14/2016 03:00 PM, Marko Tiikkaja wrote:
> On 2016-01-14 20:50, Vitaly Burovoy wrote:
>> On 1/14/16, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> 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?
>> So "arraycol[2]" is not possible there.
>
> I think the idea here was that it's allowed in UPDATE. But I don't
> see the point of allowing that in an INSERT.
>
>
>
Right. Why not just forbid anything other than a plain column name on
the LHS for INSERT, at least as a first cut.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2016-01-14 20:20:15 | Re: SET syntax in INSERT |
Previous Message | Tom Lane | 2016-01-14 20:07:05 | Re: SET syntax in INSERT |