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 542C4329D15 for ; Thu, 16 Sep 2004 21:57:47 +0100 (BST) 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 88409-04 for ; Thu, 16 Sep 2004 20:57:36 +0000 (GMT) Received: from cbc.ca (gwtor-out.cbc.ca [159.33.1.177]) by svr1.postgresql.org (Postfix) with ESMTP id F1EED329D76 for ; Thu, 16 Sep 2004 21:57:36 +0100 (BST) Received: from GWIADMOUT-MTA by cbc.ca with Novell_GroupWise; Thu, 16 Sep 2004 16:57:34 -0400 Message-Id: X-Mailer: Novell GroupWise Internet Agent 6.5.2 Date: Thu, 16 Sep 2004 16:57:19 -0400 From: "Arash Zaryoun" To: Subject: CREATE TABLE AS SELECT.... Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.6 tagged_above=0.0 required=5.0 tests=LINES_OF_YELLING, SUBJ_ALL_CAPS X-Spam-Level: X-Archive-Number: 200409/115 X-Sequence-Number: 18961 Hi All, I have a table which has 'SERIAL' datatype. When I use 'create table X as select * from my-table' , it creates the table but without serial datatype. I mean without implicit sequence. test=> \d qptuser Table "public.qptuser" Column | Type | Modifiers -----------+-----------------------+---------------------------------------------------------- srl | integer | not null default nextval('public.qptuser_srl_seq'::text) login_nme | character varying(35) | not null password | character varying(30) | not null Indexes: "pk_qptuser" primary key, btree (srl) "i1_qptuser_login_nme" unique, btree (login_nme) test=> create table x as select * from qptuser; test=> \d x Table "public.a" Column | Type | Modifiers -----------+-----------------------+----------- srl | integer | login_nme | character varying(35) | password | character varying(30) | Can you help me on this? Thanks, - Arash