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

From Veikko Mäkinen
Subject Re: Alias to a type
Date
Msg-id 42B96421.5010906@ecom.fi
Whole thread Raw
In response to Re: Alias to a type  (Richard Huxton <dev@archonet.com>)
List pgsql-sql
Richard Huxton wrote:
> 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.


Splendid, thank you all :) I'm quite sure loosely typed PHP can cope 
with my user-defined types ;)

But now I need a better modeling tool because Azzurri Clay 1.1 (Eclipse 
plug-in) doesn't let me define new types... Any suggestions? SQL DDL 
generation is the only demand I really have.


-veikko



pgsql-sql by date:

Previous
From: Achilleus Mantzios
Date:
Subject: Re: Alias to a type
Next
From: KÖPFERL Robert
Date:
Subject: Re: Alias to a type