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 16EADD1B4F6 for ; Wed, 17 Sep 2003 02:44:38 +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 93446-10 for ; Tue, 16 Sep 2003 23:44:09 -0300 (ADT) Received: from www.postgresql.com (unknown [64.117.225.209]) by svr1.postgresql.org (Postfix) with ESMTP id EAF0ED1B4F0 for ; Tue, 16 Sep 2003 23:44:05 -0300 (ADT) Received: from conure.mail.pas.earthlink.net (conure.mail.pas.earthlink.net [207.217.120.54]) by www.postgresql.com (Postfix) with ESMTP id 654ABCF49FB for ; Tue, 16 Sep 2003 23:44:05 -0300 (ADT) Received: from user-11fanob.dsl.mindspring.com ([66.245.95.11] helo=icx.net) by conure.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 19zSDi-00050h-00 for pgsql-sql@postgresql.org; Tue, 16 Sep 2003 19:39:06 -0700 Date: Tue, 16 Sep 2003 22:39:04 -0400 Subject: Re: A simple way to Create type ...? Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v552) From: John DeSoi To: pgsql-sql@postgresql.org Content-Transfer-Encoding: 7bit In-Reply-To: <60d6e0h1am.fsf@dev6.int.libertyrms.info> Message-Id: <1A568736-E8B8-11D7-87CD-0030656EE7B2@icx.net> X-Mailer: Apple Mail (2.552) X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/145 X-Sequence-Number: 15123 On Tuesday, September 16, 2003, at 05:27 PM, Christopher Browne wrote: > What you want instead is CREATE DOMAIN. > > flexreg=# create domain addresstype varchar(50); The problem here is that you can't tell the difference between a addresstype column and a varchar(50) column in the row description information returned by SELECT. All columns just look like varchar(50). It would be nice if there was something as easy as CREATE DOMAIN but worked more like CREATE TYPE. Best, John DeSoi, Ph.D.