X-Original-To: pgsql-admin@postgresql.org Received: from localhost (unknown [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id BE51A92529B for ; Tue, 20 May 2003 19:40:45 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 53702-10 for ; Tue, 20 May 2003 19:40:35 -0400 (EDT) Received: from h-e.com (wan-vc8fa2d.ston.biz.mindspring.com [216.135.168.77]) by developer.postgresql.org (Postfix) with ESMTP id CC46892523C for ; Tue, 20 May 2003 19:40:34 -0400 (EDT) Received: from [192.168.42.42] (HELO h-e.com) by h-e.com (CommuniGate Pro SMTP 3.5.9) with ESMTP id 173072 for pgsql-admin@postgresql.org; Tue, 20 May 2003 16:40:34 -0700 Date: Tue, 20 May 2003 16:40:34 -0700 Mime-Version: 1.0 (Apple Message framework v552) Content-Type: text/plain; charset=US-ASCII; format=flowed Subject: Changing NOT NULL condition on column From: Bob Smith To: pgsql-admin Content-Transfer-Encoding: 7bit Message-Id: <734BFEFD-8B1C-11D7-AAB1-0003933DD370@h-e.com> X-Mailer: Apple Mail (2.552) X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/270 X-Sequence-Number: 8832 I need to change the not-null restriction on some columns in a table, and this doesn't seem to be possible with ALTER TABLE. Is it safe to connect as superuser and update pg_attribute.attnotnull directly? Or is there a different way to do this, other than dropping/re-creating the whole table? I'm currently running 7.2.3, but will be upgrading soon so I'd like to know if this would work with 7.3 as well. Thanks! Bob Smith Hammett & Edison, Inc. bsmith@h-e.com