From: | Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(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 11:42:20 |
Message-ID: | Pine.LNX.4.44.0506221440440.4771-100000@matrix.gatewaynet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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;
> I might have to alter the type some day and this way I'd have to just
> re-define the alias. Can this be achieved by creating a new type with
> CREATE TYPE? What are the input/output functions in the CREATE TYPE
> definition?
>
> Thanks.
>
>
> -veikko
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
--
-Achilleus
From | Date | Subject | |
---|---|---|---|
Next Message | Sean Davis | 2005-06-22 12:04:39 | Re: Alias to a type |
Previous Message | Veikko Mäkinen | 2005-06-22 11:27:46 | Alias to a type |