Re: Alias to a type

From: Richard Huxton <dev(at)archonet(dot)com>
To: Veikko Mäkinen <veikko(dot)makinen(at)ecom(dot)fi>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Alias to a type
Date: 2005-06-22 12:07:01
Message-ID: 42B95465.2060708@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Veikko Mäkinen wrote:
> 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.

CREATE DOMAIN username_string AS varchar(20);

Test it with your client applications though, make sure they cope. Some
don't cope well with user-defined types.
--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Achilleus Mantzios 2005-06-22 12:14:25 Re: Alias to a type
Previous Message Sean Davis 2005-06-22 12:04:39 Re: Alias to a type