From: | Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net> |
---|---|
To: | Francisco Olarte <folarte(at)peoplecall(dot)com> |
Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: [EXTERNAL]: Re: [EXTERNAL]: Re: UPSERT in Postgres |
Date: | 2023-04-10 12:35:38 |
Message-ID: | ZDQCmrgilvcVsRoW@hermes.hilbert.loc |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Am Mon, Apr 10, 2023 at 01:33:41PM +0200 schrieb Francisco Olarte:
> > > > 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 ?
>
> A timestamp is a point in the time line, this is what I insert, just a
> real number marking a line, timezones and dst are presentation stuff.
Indeed, as is the assumption which time line the numbers are
referring to. Hence the incoming call timestamp is usable as
a (natural) PK with respect to a given time line only, right?
> > spoofing ?
>
> ¿ Of what ?
The time stamp. But then I assume that is obtained on the
logging system.
All I really wanted to hint at is that "incoming call
timestamp" may work pretty well in given settings but does
not _always_ make for a "unique enough" key.
Karsten
--
GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B
From | Date | Subject | |
---|---|---|---|
Next Message | Peter J. Holzer | 2023-04-10 14:43:59 | Re: [EXTERNAL]: Re: [EXTERNAL]: Re: UPSERT in Postgres |
Previous Message | Francisco Olarte | 2023-04-10 11:33:41 | Re: [EXTERNAL]: Re: [EXTERNAL]: Re: UPSERT in Postgres |