Received: from bigglesworth.mail.be.easynet.net (bigglesworth.mail.be.easynet.net [212.100.160.67]) by postgresql.org (Postfix) with ESMTP id 2DD0447546E for ; Tue, 23 Jul 2002 09:47:42 -0400 (EDT) Received: from bidibule.office.be.easynet.net ([212.100.163.150]) by bigglesworth.mail.be.easynet.net with esmtp (Exim 3.35 #1) id 17X00v-0000f4-00 for pgsql-admin@postgresql.org; Tue, 23 Jul 2002 15:47:45 +0200 Received: from rb by bidibule.office.be.easynet.net with local (Exim 3.35 #1 (Debian)) id 17WzyS-0005kX-00 for ; Tue, 23 Jul 2002 15:45:12 +0200 Date: Tue, 23 Jul 2002 15:45:12 +0200 From: Raphael Bauduin To: pgsql-admin@postgresql.org Subject: CREATE TABLE AS ... Message-ID: <20020723134512.GA22069@raphael> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Archive-Number: 200207/353 X-Sequence-Number: 5037 Hi, In a data model change, I wanted to use the "create table as select" feature. However, I want that table to have a primary key defined, and thus a field defined as NOT NULL. I didn't find a way to add a NOT NULL constraint on a column of an existing table. If there isn't, what's the best way to go? A COPY? Thanks. Raph