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 2812B528CB for ; Wed, 22 Jun 2005 11:42:39 -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 33978-09 for ; Wed, 22 Jun 2005 14:42:28 +0000 (GMT) Received: from mx-00.sil.at (mx-00.sil.at [62.116.68.196]) by svr1.postgresql.org (Postfix) with ESMTP id DBA60528B4 for ; Wed, 22 Jun 2005 11:42:25 -0300 (ADT) Received: (qmail-ldap/ctrl 66462 invoked from network); 22 Jun 2005 14:42:26 -0000 Received: from unknown (HELO io.sonorys.at) ([213.235.243.42]) (envelope-sender ) by mx-00.sil.at (qmail-ldap-1.03) with SMTP for ; 22 Jun 2005 14:42:26 -0000 Received: from neptun.sonorys.at (neptun.sonorys.at [172.24.1.17]) by io.sonorys.at (8.11.7+Sun/8.11.7) with ESMTP id j5MEgSG26014 for ; Wed, 22 Jun 2005 16:42:28 +0200 (MEST) Received: by neptun.sonorys.at with Internet Mail Service (5.5.2653.19) id ; Wed, 22 Jun 2005 16:42:28 +0200 Message-ID: From: =?iso-8859-1?Q?K=D6PFERL_Robert?= To: pgsql-sql@postgresql.org Subject: Re: Alias to a type Date: Wed, 22 Jun 2005 16:42:19 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.009 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/271 X-Sequence-Number: 21872 Keep in mind, though. Using a DOMAIN in some definition 'seals' the = domain. Yo can't change the domain unless you drop all dependent objects |-----Original Message----- |From: Veikko M=E4kinen [mailto:veikko.makinen@ecom.fi] |Sent: Mittwoch, 22. Juni 2005 15:14 |To: pgsql-sql@postgresql.org |Subject: Re: [SQL] Alias to a type | | |Richard Huxton wrote: |> Veikko M=E4kinen wrote: |>=20 |>> Hey, |>> |>> Is it possible to create a new type as an alias to a=20 |pre-defined type?=20 |>> I use "USERID varchar(20)" in almost every table I have I'd like to = |>> make an alias for that type eg. |>=20 |>=20 |> CREATE DOMAIN username_string AS varchar(20); |>=20 |> Test it with your client applications though, make sure they=20 |cope. Some=20 |> don't cope well with user-defined types. | | |Splendid, thank you all :) I'm quite sure loosely typed PHP can cope=20 |with my user-defined types ;) | |But now I need a better modeling tool because Azzurri Clay 1.1=20 |(Eclipse=20 |plug-in) doesn't let me define new types... Any suggestions? SQL DDL=20 |generation is the only demand I really have. | | |-veikko | | |---------------------------(end of=20 |broadcast)--------------------------- |TIP 3: if posting/reading through Usenet, please send an appropriate | subscribe-nomail command to majordomo@postgresql.org so=20 |that your | message can get through to the mailing list cleanly |