On Sat, Aug 22, 2015 at 11:25 AM, <av(dot)kostromin(at)gmail(dot)com> wrote:
> INSERT INTO t_tags_ident (tag_name, "comment")
> VALUES ('tag1','comment1'), ('tag2','comment2'), ('tag3','comment3'),
> ('tag4','comment4')
> ON CONFLICT (tag_name)
> DO UPDATE SET "comment" = EXCLUDED.comment
> RETURNING id
> there is the following problem. The sequence value is increased by the
> quantity of updated (conflict) rows, i.e. when I insert the new row its id
> is equal to the quantity of updated rows + 1. Is it OK for upsert?
This is the expected behavior. It is not a bug.
--
Peter Geoghegan