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 32DBC528BB for ; Wed, 22 Jun 2005 08:56:00 -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 99010-06 for ; Wed, 22 Jun 2005 11:55:50 +0000 (GMT) Received: from matrix.gatewaynet.com (matrix.gatewaynet.com [217.19.69.50]) by svr1.postgresql.org (Postfix) with ESMTP id 3D780528B7 for ; Wed, 22 Jun 2005 08:55:46 -0300 (ADT) Received: from matrix.gatewaynet.com (localhost.localdomain [127.0.0.1]) by matrix.gatewaynet.com (8.12.8/8.12.8) with ESMTP id j5MBgKBS004909; Wed, 22 Jun 2005 14:42:20 +0300 Received: from localhost (achill@localhost) by matrix.gatewaynet.com (8.12.8/8.12.8/Submit) with ESMTP id j5MBgKJS004905; Wed, 22 Jun 2005 14:42:20 +0300 Date: Wed, 22 Jun 2005 14:42:20 +0300 (EEST) From: Achilleus Mantzios To: =?ISO-8859-1?Q?Veikko_M=E4kinen?= Cc: pgsql-sql@postgresql.org Subject: Re: Alias to a type In-Reply-To: <42B94B32.5040707@ecom.fi> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-7 Content-Transfer-Encoding: 8BIT X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.008 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/265 X-Sequence-Number: 21866 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); > > 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