Re: operator class - Mailing list pgsql-sql

From Tom Lane
Subject Re: operator class
Date
Msg-id 17912.1204176644@sss.pgh.pa.us
Whole thread Raw
In response to operator class  ("miquel_ibanez" <miquel_ibanez@sumimail.com>)
List pgsql-sql
"miquel_ibanez" <miquel_ibanez@sumimail.com> writes:
> CREATE TYPE t_cod_t_activ AS (
>       cod_t_activ       CHAR(10)
>       );

If you just want an alias for char(10), a domain would probably work
better.  CREATE TYPE AS is meant for creating multi-field row types.

> Does it mean that I cannot create an index on a field wich is of a type
> defined by the user?

Sure, if you are also willing to define operators and operator classes
on your type.
        regards, tom lane


pgsql-sql by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Subselects returning array and ANY...
Next
From: "Bart Degryse"
Date:
Subject: Re: Function returns error (view)