Re: Alias to a type - Mailing list pgsql-sql

From Sean Davis
Subject Re: Alias to a type
Date
Msg-id af9f545f8a3ab4a09d90b2d589443a49@mail.nih.gov
Whole thread Raw
In response to Re: Alias to a type  (Achilleus Mantzios <achill@matrix.gatewaynet.com>)
Responses Re: Alias to a type  (Bruno Wolff III <bruno@wolff.to>)
Re: Alias to a type  (Achilleus Mantzios <achill@matrix.gatewaynet.com>)
List pgsql-sql
On Jun 22, 2005, at 7:42 AM, Achilleus Mantzios wrote:

> O Veikko Mδkinen έγραψε στις Jun 22, 2005 :
>
>> Hey,
>>
>> Is it possible to create a new type as an alias to a pre-defined
>> type? I
>> use "USERID varchar(20)" in almost every table I have I'd like to make
>> an alias for that type eg.
>>
>> <pseudo-sql>
>>    create type myschema.useridtype as varchar(20);
>> </pseudo-sql>
>>
>
> Try something like
>
> CREATE DOMAIN my_integer AS INTEGER;

Just for my own edification, does creating a "simple" domain like this
then require a whole set of functions for indexing, etc., like other
more complex user-defined types, or will postgres "do the right thing"?

Thanks,
Sean



pgsql-sql by date:

Previous
From: Achilleus Mantzios
Date:
Subject: Re: Alias to a type
Next
From: Richard Huxton
Date:
Subject: Re: Alias to a type