X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 36ACF9DC816 for ; Tue, 14 Feb 2006 18:06:38 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 74797-09 for ; Tue, 14 Feb 2006 18:06:39 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id D002D9DC804 for ; Tue, 14 Feb 2006 18:06:34 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id k1EM6YvT023216; Tue, 14 Feb 2006 17:06:34 -0500 (EST) To: Maciej Piekielniak cc: pgsql-sql@postgresql.org Subject: Re: create table and data types In-reply-to: <1827225102.20060214221218@isb.com.pl> References: <1827225102.20060214221218@isb.com.pl> Comments: In-reply-to Maciej Piekielniak message dated "Tue, 14 Feb 2006 22:12:18 +0100" Date: Tue, 14 Feb 2006 17:06:34 -0500 Message-ID: <23215.1139954794@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.109 required=5 tests=[AWL=0.109] X-Spam-Score: 0.109 X-Spam-Level: X-Archive-Number: 200602/159 X-Sequence-Number: 24169 Maciej Piekielniak writes: > Is anybody know how create field in a new table with data type accuiring from a field in other table? Sorry, the %TYPE syntax only works in function declarations at the moment. It could possibly be made to work in table declarations --- there are syntactic conflicts with allowing it in general, but I'm not sure that objection applies to table declarations. But it's not there today. regards, tom lane