Re: extended operator classes vs. type interfaces

From: Nathan Boley <npboley(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: extended operator classes vs. type interfaces
Date: 2010-04-09 23:18:36
Message-ID: u2p6fa3b6e21004091618re5ad35f5qdb83d009a8e2c62c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> The advantage of specifying a + and a - in the type interface is that
> the unit definition can then be specified as part of the type
> declaration itself.  So you can do:
>
> CREATE TYPE ts_sec AS RANGE OVER timestamp (UNIT = '1s');
> CREATE TYPE ts_min AS RANGE OVER timestamp (UNIT = '1m');
>
> All of the stuff about defining + and - is hidden from the user - it's
> part of the type interface, which is pre-created.
>

The disadvantage is that it does not permit irregularly spaced units.

-Nathan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Erik Rijkers 2010-04-09 23:23:15 testing HS/SR - 1 vs 2 performance
Previous Message Robert Haas 2010-04-09 22:05:32 Re: GSoC - proposal - Materialized Views in PostgreSQL