Re: [SQL] Alias to a type

2005-06-22 Thread KÖPFERL Robert
rg |Subject: Re: [SQL] Alias to a type | | |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 li

Re: [SQL] Alias to a type

2005-06-22 Thread Veikko Mäkinen
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 clie

Re: [SQL] Alias to a type

2005-06-22 Thread Achilleus Mantzios
O Sean Davis έγραψε στις Jun 22, 2005 : > > 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

Re: [SQL] Alias to a type

2005-06-22 Thread Richard Huxton
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, m

Re: [SQL] Alias to a type

2005-06-22 Thread Bruno Wolff III
On Wed, Jun 22, 2005 at 08:04:39 -0400, Sean Davis <[EMAIL PROTECTED]> wrote: > > > 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 t

Re: [SQL] Alias to a type

2005-06-22 Thread Sean Davis
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. create typ

Re: [SQL] Alias to a type

2005-06-22 Thread Achilleus Mantzios
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. > > >create type myschema.useridtype as varchar(20); > >

[SQL] Alias to a type

2005-06-22 Thread Veikko Mäkinen
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 type myschema.useridtype as varchar(20); I might have to alter the type some day and this way I'd have to