pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Karsten Hilbert <Karsten.Hilbert@gmx.net>
To: pgsql-general@lists.postgresql.org
Subject: Re: [EXTERNAL]: Re: [EXTERNAL]: Re: UPSERT in Postgres
Date: Mon, 10 Apr 2023 11:39:53 +0200
Message-ID: <ZDPZadH7FJDh1RcB@hermes.hilbert.loc> (raw)
In-Reply-To: <CA+bJJbxS8RWt=5ru9ax779Hj3Or=vnmMHni89c+UH14tSp4XYA@mail.gmail.com>
References: <SY4P282MB1052A434D91AC0656589B6AEA6919@SY4P282MB1052.AUSP282.PROD.OUTLOOK.COM>
	<CAH2-WzkSGmA-ZyMFu_EqQJ8tSgToj6h2=w8znTUa0Nw4oQvVHA@mail.gmail.com>
	<SY4P282MB10529BE09B553228FAA71163A6919@SY4P282MB1052.AUSP282.PROD.OUTLOOK.COM>
	<C1A7991E-251B-4422-AB4B-C1531D863036@gmail.com>
	<SY4P282MB1052FA4F93997B6AD37F5CF4A6959@SY4P282MB1052.AUSP282.PROD.OUTLOOK.COM>
	<bd8b994f-adcf-766d-7766-2d83f0ba4139@gmail.com>
	<CA+bJJbxS8RWt=5ru9ax779Hj3Or=vnmMHni89c+UH14tSp4XYA@mail.gmail.com>

Am Mon, Apr 10, 2023 at 09:41:15AM +0200 schrieb Francisco Olarte:

> On Mon, 10 Apr 2023 at 04:16, Rob Sargent <robjsargent@gmail.com> wrote:
> > > An UPSERT checks whether a row exists, if so, it does an update, if not it does an insert. This is the literal definition.
> > This the part that's always eluded me: How does the client, the
> > UPSERTer, come to hold an id and not know whether or not it's already in
> > the database.
>
> This is extremely easy to do if you have natural instead of surrogate keys.
>
> I work in telephony, upserting the last incoming call timestamp for a
> phone number will be exactly that.

timezones ?

DST ?

spoofing ?

...

Karsten
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B





view thread (12+ messages)  latest in thread

Message-ID: <ZDPZadH7FJDh1RcB@hermes.hilbert.loc>
Permalink:  ../ZDPZadH7FJDh1RcB@hermes.hilbert.loc/
Also on:    postgresql.org/message-id/ZDPZadH7FJDh1RcB@hermes.hilbert.loc

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: Karsten.Hilbert@gmx.net
  Subject: Re: [EXTERNAL]: Re: [EXTERNAL]: Re: UPSERT in Postgres
  In-Reply-To: <ZDPZadH7FJDh1RcB@hermes.hilbert.loc>
  References: <SY4P282MB1052A434D91AC0656589B6AEA6919@SY4P282MB1052.AUSP282.PROD.OUTLOOK.COM> <CAH2-WzkSGmA-ZyMFu_EqQJ8tSgToj6h2=w8znTUa0Nw4oQvVHA@mail.gmail.com> <SY4P282MB10529BE09B553228FAA71163A6919@SY4P282MB1052.AUSP282.PROD.OUTLOOK.COM> <C1A7991E-251B-4422-AB4B-C1531D863036@gmail.com> <SY4P282MB1052FA4F93997B6AD37F5CF4A6959@SY4P282MB1052.AUSP282.PROD.OUTLOOK.COM> <bd8b994f-adcf-766d-7766-2d83f0ba4139@gmail.com> <CA+bJJbxS8RWt=5ru9ax779Hj3Or=vnmMHni89c+UH14tSp4XYA@mail.gmail.com> <ZDPZadH7FJDh1RcB@hermes.hilbert.loc>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox