Re: Domain based on TIMEZONE WITH TIME ZONE - Mailing list pgsql-general

From Ben Hood
Subject Re: Domain based on TIMEZONE WITH TIME ZONE
Date
Msg-id D9289E35-E24B-4C3A-8E76-18220DF01719@relops.com
Whole thread Raw
In response to Re: Domain based on TIMEZONE WITH TIME ZONE  (Vick Khera <vivek@khera.org>)
Responses Re: Domain based on TIMEZONE WITH TIME ZONE  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: Domain based on TIMEZONE WITH TIME ZONE  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general

On 10 May 2018, at 15:12, Vick Khera <vivek@khera.org> wrote:

On Thu, May 10, 2018 at 7:31 AM, Ben Hood <ben@relops.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.

pgsql-general by date:

Previous
From: Ben Hood
Date:
Subject: Re: Domain based on TIMEZONE WITH TIME ZONE
Next
From: Ben Hood
Date:
Subject: Re: Domain based on TIMEZONE WITH TIME ZONE