X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 29917D1B512 for ; Tue, 16 Sep 2003 21:05:08 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 45862-04 for ; Tue, 16 Sep 2003 18:04:37 -0300 (ADT) Received: from web21409.mail.yahoo.com (web21409.mail.yahoo.com [216.136.232.79]) by svr1.postgresql.org (Postfix) with SMTP id BCCCFD1B514 for ; Tue, 16 Sep 2003 18:04:35 -0300 (ADT) Message-ID: <20030916210436.81214.qmail@web21409.mail.yahoo.com> Received: from [64.81.205.234] by web21409.mail.yahoo.com via HTTP; Tue, 16 Sep 2003 14:04:36 PDT Date: Tue, 16 Sep 2003 14:04:36 -0700 (PDT) From: ow Subject: A simple way to Create type ...? To: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/140 X-Sequence-Number: 15118 Hi, I had a look at "create type" docs and it seems somewhat complex, involving creation of functions and etc. I hope there's a simpler way for the following: How should one declare a new custom type, say, "AddressType" that corresponds internally to "varchar(50)". In other words, all columns that are assigned "AddressType" would internally be "varchar(50)". Example: create type AddressType ... -- how to do it in a simple way? create table ADDRESS { address_id int not null, street_address1 AdressType not null, street_address2 AdressType not null, .... ) Thanks __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com