Re: Time range

From: Isaac Morland <isaac(dot)morland(at)gmail(dot)com>
To: Thomas Kellerer <shammat(at)gmx(dot)net>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Time range
Date: 2019-05-31 18:09:04
Message-ID: CAMsGm5eTvRHQ3AJ44qyak4AvPsj9PpxMrOdPQPPQwvsmRJwRDg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

timetzrange is also missing. In my database I have:

CREATE TYPE timerange AS RANGE (SUBTYPE = time);
COMMENT ON TYPE timerange IS 'range of times without time zone';
GRANT USAGE ON TYPE timerange TO PUBLIC;

CREATE TYPE timetzrange AS RANGE (SUBTYPE = timetz);
COMMENT ON TYPE timetzrange IS 'range of times with time zone';
GRANT USAGE ON TYPE timetzrange TO PUBLIC;

The intent is that these range types are the same as if they were built in.
I don't believe I have ever used timetzrange but I did it for completeness.

Given that other built-in types have built-in range types, I think that the
time and timetz types should also have built-in range types.

On Fri, 31 May 2019 at 11:40, Thomas Kellerer <shammat(at)gmx(dot)net> wrote:

>
>
> Donald Shtjefni schrieb am 31.05.2019 um 13:35:
> > I was wondering why there is not a type Range of time without time zone,
> I think it may be useful for someone, Is good if i do PR.
>
> you can easily create one:
>
> create type timerange as range (subtype = time);
>
> Thomas
>
>
>
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-05-31 19:00:57 Re: Time range
Previous Message David Rowley 2019-05-31 17:34:17 Re: Comment typo in tableam.h