Re: Range Types

Dimitri Fontaine <dimitri@2ndquadrant.fr>

From: Dimitri Fontaine <dimitri@2ndQuadrant.fr>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Dimitri Fontaine <dimitri@2ndQuadrant.fr>, pgsql-hackers@postgresql.org
Date: 2011-02-07T17:23:32Z
Lists: pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:
> Ok, but what should the parameter to CREATE TYPE ... AS RANGE be then?
>
> CREATE TYPE foo AS RANGE (
>   SUBTYPE = ...
>   SUBTYPE_BTREE_OPERATOR_CLASS = ...
> );
>
> is a little verbose. Ideas?

I would think

  CREATE TYPE foo AS RANGE (bar) USING (btree_ops);

The USING clause is optional, because you generally have a default btree
opclass for the datatype.

Regards,
-- 
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support