Re: Range-Types in 9.2

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Range-Types in 9.2
Date: 2012-08-04 07:14:26
Message-ID: 20120804071426.GA6876@tux
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jeff Davis <pgsql(at)j-davis(dot)com> wrote:

> On Fri, 2012-08-03 at 17:06 +0200, Andreas Kretschmer wrote:
> > Hi all,
> > great feature, but i can't find a TIMERANGE, i want to store time-ranges, for
> > instance [10:00:00,16:00:00), how can i do that?
>
> CREATE TYPE timerange AS RANGE ( subtype = time );

Thx.

>
> That's the simple answer. I believe we discussed including this as a
> built-in range type at some point, but decided against it. I can't
> remember the reason right now.

Okay, but is it possible to write down this as an example in the
documentation? I think there are a LOT of possible use-cases for
TIMERANGE ... (or, better, include it as build-in ...)

Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jasen Betts 2012-08-04 08:52:13 Re: Smaller data types use same disk space
Previous Message Thomas Kellerer 2012-08-04 07:08:23 Re: Installer problem report with interesting solution