From: | Rolf Lüttecke <rolf(dot)luettecke(at)michael-telecom(dot)de> |
---|---|
To: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | Alter column / array |
Date: | 2001-10-11 07:12:17 |
Message-ID: | 00f101c15224$0f952f20$8300a8c0@michaeltelecom.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Dong B Calmada | 2001-10-11 07:48:56 | how to create function/procedure for commenting multiple objects (e.g., columns) |
Previous Message | Tom Lane | 2001-10-11 04:36:13 | Re: Database access error after upgrade 7.1.2 -> 7.1.3 |