Alter column / array
| От | Rolf Lüttecke |
|---|---|
| Тема | Alter column / array |
| Дата | |
| Msg-id | 00f101c15224$0f952f20$8300a8c0@michaeltelecom.de обсуждение исходный текст |
| Ответы |
Re: Alter column / array
Re: Alter column / array |
| Список | 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
В списке pgsql-admin по дате отправления: