Re: [EXTERNAL]: Re: [EXTERNAL]: Re: UPSERT in Postgres

Поиск
Список
Период
Сортировка
От Karsten Hilbert
Тема Re: [EXTERNAL]: Re: [EXTERNAL]: Re: UPSERT in Postgres
Дата
Msg-id ZDQCmrgilvcVsRoW@hermes.hilbert.loc
обсуждение исходный текст
Ответ на Re: [EXTERNAL]: Re: [EXTERNAL]: Re: UPSERT in Postgres  (Francisco Olarte <folarte@peoplecall.com>)
Ответы Re: [EXTERNAL]: Re: [EXTERNAL]: Re: UPSERT in Postgres  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Список 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



В списке pgsql-general по дате отправления:

Предыдущее
От: Francisco Olarte
Дата:
Сообщение: Re: [EXTERNAL]: Re: [EXTERNAL]: Re: UPSERT in Postgres
Следующее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: [EXTERNAL]: Re: [EXTERNAL]: Re: UPSERT in Postgres