X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 886AD52806 for ; Wed, 22 Jun 2005 08:27:42 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 92444-07 for ; Wed, 22 Jun 2005 11:27:40 +0000 (GMT) Received: from mx1.lansilinkki.net (mx1.lansilinkki.net [212.83.96.242]) by svr1.postgresql.org (Postfix) with ESMTP id 3BF10528C3 for ; Wed, 22 Jun 2005 08:27:37 -0300 (ADT) Received: from [127.0.0.1] (ecom-174.postikaista.net [80.74.214.174]) by mx1.lansilinkki.net (8.12.10/8.12.10) with ESMTP id j5MBRbhj029917 for ; Wed, 22 Jun 2005 14:27:39 +0300 (EEST) Message-ID: <42B94B32.5040707@ecom.fi> Date: Wed, 22 Jun 2005 14:27:46 +0300 From: =?ISO-8859-1?Q?Veikko_M=E4kinen?= User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Alias to a type Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200506/264 X-Sequence-Number: 21865 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 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