Received: from mail.michael-telecom.de (mabo-leuchten.de [195.243.212.246]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f9B7DBn13937 for ; Thu, 11 Oct 2001 03:13:12 -0400 (EDT) (envelope-from rolf.luettecke@michael-telecom.de) Received: from dcm19 (dcm19.michael-telecom.de [192.168.0.131]) by mail.michael-telecom.de (Postfix) with SMTP id AA3075E584 for ; Thu, 11 Oct 2001 09:13:01 +0200 (CEST) Message-ID: <00f101c15224$0f952f20$8300a8c0@michaeltelecom.de> From: =?iso-8859-1?Q?Rolf_L=FCttecke?= To: Subject: Alter column / array Date: Thu, 11 Oct 2001 09:12:17 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200110/95 X-Sequence-Number: 2341 Hi list, I can't find out why the following command give different results: database-# CREATE TABLE "test1" (dev_id int, dev_slots integer[] DEFAULT '{0,0,0,0,0}'); CREATE If you display (\d test1) the table-structure all looks good - even the DEFAULTs. ...but if you have an existing table and want to add a column of type array, it doesn't work: database-# CREATE TABLE "test2" (dev_id int); CREATE database-# ALTER TABLE "test2" ADD COLUMN dev_slots integer[] DEFAULT '{0,0,0,0,0}'); ALTER If you now display the table-structure, the DEFAULT-statement is not listed and UPDATE-commands on the ARRAY do strange things. Any clou? Regards R. Lüttecke (IT) MICHAELTELECOM AG Bruchheide 34 49163 Bohmte +49 5471 8060 http://www.michael-telecom.de