Re: Domain based on TIMEZONE WITH TIME ZONE

From: Ben Hood <ben(at)relops(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Domain based on TIMEZONE WITH TIME ZONE
Date: 2018-05-10 16:13:40
Message-ID: D9289E35-E24B-4C3A-8E76-18220DF01719@relops.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> On 10 May 2018, at 15:12, Vick Khera <vivek(at)khera(dot)org> wrote:
>
> On Thu, May 10, 2018 at 7:31 AM, Ben Hood <ben(at)relops(dot)com <mailto:ben(at)relops(dot)com>> 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ben Hood 2018-05-10 16:22:49 Re: Domain based on TIMEZONE WITH TIME ZONE
Previous Message Ben Hood 2018-05-10 16:09:08 Re: Domain based on TIMEZONE WITH TIME ZONE