Re: INSERT ... ON CONFLICT DO UPDATE

From: Geoff Winkless <pgsqladmin(at)geoff(dot)dj>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: INSERT ... ON CONFLICT DO UPDATE
Date: 2015-07-19 08:27:50
Message-ID: CAEzk6ffawZhw=0zQ7vfdso-QYwvoZK3vEMc5coPsFpBUpEa6gw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 19 July 2015 at 09:11, Rafal Pietrak <rafal(at)ztk-rp(dot)eu> wrote:

> I'm not particularly fond of using functions to accessing RDBMS instead
> of tables.
>
> And I'm not particularly fond of "workarounds".
>

Use a combination of factors (a sequence ID and the key) for your
authorization. So in the extremely unlikely event that the random key isn't
unique, it doesn't matter. That's not a workaround, it's good design.

You're asking for a feature that is completely unnecessary and is easily
resolved. UPSERT is designed for a situation which is neither.

Geoff

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rafal Pietrak 2015-07-19 10:30:16 Re: INSERT ... ON CONFLICT DO UPDATE
Previous Message Rafal Pietrak 2015-07-19 08:11:41 Re: INSERT ... ON CONFLICT DO UPDATE