Re: Domain based on TIMEZONE WITH TIME ZONE

Поиск
Список
Период
Сортировка
Искать
От
Adrian Klaver
Тема
Re: Domain based on TIMEZONE WITH TIME ZONE
Дата
в 20:29:00
Msg-id
f71d464b-2469-2f27-85a6-54c64b061bd5@aklaver.com
Ответ на
Список
Дерево обсуждения
Domain based on TIMEZONE WITH TIME ZONE Ben Hood <ben@relops.com>
Re: Domain based on TIMEZONE WITH TIME ZONE Ben Hood <ben@relops.com>
Re: Domain based on TIMEZONE WITH TIME ZONE Francisco Olarte <folarte@peoplecall.com>
Re: Domain based on TIMEZONE WITH TIME ZONE Ben Hood <ben@relops.com>
Re: Domain based on TIMEZONE WITH TIME ZONE Tom Lane <tgl@sss.pgh.pa.us>
Re: Domain based on TIMEZONE WITH TIME ZONE Ben Hood <ben@relops.com>
Re: Domain based on TIMEZONE WITH TIME ZONE Karsten Hilbert <Karsten.Hilbert@gmx.net>
Re: Domain based on TIMEZONE WITH TIME ZONE Ben Hood <ben@relops.com>
Re: Domain based on TIMEZONE WITH TIME ZONE Adrian Klaver <adrian.klaver@aklaver.com>
Re: Domain based on TIMEZONE WITH TIME ZONE Karsten Hilbert <Karsten.Hilbert@gmx.net>
Re: Domain based on TIMEZONE WITH TIME ZONE Ben Hood <ben@relops.com>
Re: Domain based on TIMEZONE WITH TIME ZONE Ben Hood <ben@relops.com>
Re: Domain based on TIMEZONE WITH TIME ZONE Adrian Klaver <adrian.klaver@aklaver.com>
Re: Domain based on TIMEZONE WITH TIME ZONE Ben Hood <ben@relops.com>
Re: Domain based on TIMEZONE WITH TIME ZONE Karsten Hilbert <Karsten.Hilbert@gmx.net>
Re: Domain based on TIMEZONE WITH TIME ZONE Vick Khera <vivek@khera.org>
Re: Domain based on TIMEZONE WITH TIME ZONE Ben Hood <ben@relops.com>
Re: Domain based on TIMEZONE WITH TIME ZONE "David G. Johnston" <david.g.johnston@gmail.com>
Re: Domain based on TIMEZONE WITH TIME ZONE Ben Hood <ben@relops.com>
Re: Domain based on TIMEZONE WITH TIME ZONE Adrian Klaver <adrian.klaver@aklaver.com>
Re: Domain based on TIMEZONE WITH TIME ZONE Ben Hood <ben@relops.com>
Re: Domain based on TIMEZONE WITH TIME ZONE Francisco Olarte <folarte@peoplecall.com>
Re: Domain based on TIMEZONE WITH TIME ZONE Ben Hood <ben@relops.com>
Re: Domain based on TIMEZONE WITH TIME ZONE "Peter J. Holzer" <hjp-pgsql@hjp.at>
Re: Domain based on TIMEZONE WITH TIME ZONE Ben Hood <ben@relops.com>
Re: Domain based on TIMEZONE WITH TIME ZONE Adrian Klaver <adrian.klaver@aklaver.com>
Re: Domain based on TIMEZONE WITH TIME ZONE Adrian Klaver <adrian.klaver@aklaver.com>
Re: Domain based on TIMEZONE WITH TIME ZONE Ben Hood <ben@relops.com>
Re: Domain based on TIMEZONE WITH TIME ZONE Francisco Olarte <folarte@peoplecall.com>
Re: Domain based on TIMEZONE WITH TIME ZONE Adrian Klaver <adrian.klaver@aklaver.com>
Re: Domain based on TIMEZONE WITH TIME ZONE Francisco Olarte <folarte@peoplecall.com>
Re: Domain based on TIMEZONE WITH TIME ZONE Adrian Klaver <adrian.klaver@aklaver.com>
Re: Domain based on TIMEZONE WITH TIME ZONE Francisco Olarte <folarte@peoplecall.com>
Re: Domain based on TIMEZONE WITH TIME ZONE Adrian Klaver <adrian.klaver@aklaver.com>
Re: Domain based on TIMEZONE WITH TIME ZONE "Peter J. Holzer" <hjp-pgsql@hjp.at>
Re: Domain based on TIMEZONE WITH TIME ZONE Adrian Klaver <adrian.klaver@aklaver.com>
On 05/10/2018 09:13 AM, Ben Hood wrote:
> 
>> On 10 May 2018, at 15:12, Vick Khera > > wrote:
>>
>> On Thu, May 10, 2018 at 7:31 AM, Ben Hood > > wrote:
>>
>>     Or are we saying that domains are one way of achieving the
>>     timestamp hygiene, but equally, you can get the same result as
>>     described above?
>>
>>
>> The *only* way to have timestamp hygiene is to require them to have 
>> time zones at all times, even if that time zone is UTC. Any other 
>> representation of a time is ambiguous without context.
> 
> That makes sense.
> 
> The motivation behind narrowing the built in TIMESTAMP WITH TIME ZONE 
> down to a domain is to ensure the only permissible zone offset is UTC. 
> This would be unambiguous.

Per my previous post a timestamp with timezone is going to be stored as 
UTC, so there is no ambiguity there. On reflection I realized your 
concern maybe with determining the original input timezone. That 
information is not stored by Postgres, so there can be ambiguity as to 
their value. Doing all timestamps in UTC is one one way to eliminate 
this. The potential issue I see is that you now push the ambiguity into 
the app. Namely just from looking at the database values you still do 
not know what the original timezone the app lives in is.



-- 
Adrian Klaver
adrian.klaver@aklaver.com

В списке pgsql-general по дате отправления
От: Adrian Klaver
Дата:
От: Tom Lane
Дата:
FAQ