Re: INSERT ... ON CONFLICT UPDATE/IGNORE 4.0
От | Andreas Karlsson |
---|---|
Тема | Re: INSERT ... ON CONFLICT UPDATE/IGNORE 4.0 |
Дата | |
Msg-id | 554ABF43.40708@proxel.se обсуждение исходный текст |
Ответ на | Re: INSERT ... ON CONFLICT UPDATE/IGNORE 4.0 (Heikki Linnakangas <hlinnaka@iki.fi>) |
Список | pgsql-hackers |
On 05/06/2015 09:51 PM, Heikki Linnakangas wrote: >> So, yes, DO NOTHING does very little - and that is its appeal. >> Supporting this behavior does not short change those who actually care >> about the existing tuple sticking around for the duration of their >> transaction - they have a way of doing that. If you want to document >> INSERT IGNORE as being primarily an ETL-orientated thing, that would >> make sense, but let's not hobble that use case. > > Yeah, I agree that DO NOTHING should not lock the rows. It might make > sense to have a DO LOCK variant, which locks the rows, although I don't > immediately see what the use case would be. It seems like a very useful feature to me, if you want to upsert something into a table with a serial column and get the value of the serial column in a RETURNING clause (but not update any fields if there is a conflict). Then I am pretty sure I want to lock the row. Andreas
В списке pgsql-hackers по дате отправления: