Re: Range-Types in 9.2

From: "Marc Mamin" <M(dot)Mamin(at)intershop(dot)de>
To: "Jeff Davis" <pgsql(at)j-davis(dot)com>, "Andreas Kretschmer" <andreas(at)a-kretschmer(dot)de>
Cc: "pg-general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Range-Types in 9.2
Date: 2012-08-03 18:08:15
Message-ID: C4DAC901169B624F933534A26ED7DF310F96B041@JENMAIL01.ad.intershop.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hello,

agree about this great feature :)

There is another point I've wondered about:

Is there some logical reason why no function width(range) was added to the bundle ?
not a big deal, but width(range) looks just nicer than upper(range)-lower(range)

best regards,

Marc Mamin

-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org on behalf of Jeff Davis
Sent: Fri 8/3/2012 7:42 PM
To: Andreas Kretschmer
Cc: pg-general
Subject: Re: [GENERAL] Range-Types in 9.2

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 );

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.

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2012-08-03 18:25:16 Re: Range-Types in 9.2
Previous Message Jeff Davis 2012-08-03 17:42:26 Re: Range-Types in 9.2