Re: Could be improved point of UPSERT

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Yourfriend <doudou586(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Could be improved point of UPSERT
Date: 2015-07-15 07:23:10
Message-ID: CAM3SWZQkfqf=Z8cQq4z7bvbetY0tZ6BF-2v6+itDS+RRtTXKGQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 15, 2015 at 12:01 AM, Yourfriend <doudou586(at)gmail(dot)com> wrote:
> for example, SO201507_1001, PO201503_1280, etc.
>
> As these IDs would be the most important attribute to the business, so, we
> hope there is no gap for the IDs.

That's a requirement I've heard a number of times before. If you're
relying on a sequence for this purpose, your application is already
broken [1]. UPSERT need not be involved at all.

[1] http://www.varlena.com/GeneralBits/130.php
--
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2015-07-15 07:27:52 Re: Memory Accounting v11
Previous Message Amit Kapila 2015-07-15 07:18:40 Re: [DESIGN] Incremental checksums