Re: drop a check
От | Andreas Kretschmer |
---|---|
Тема | Re: drop a check |
Дата | |
Msg-id | 20061113183401.GA31078@KanotixBox обсуждение исходный текст |
Ответ на | drop a check (ivan marchesini <marchesini@unipg.it>) |
Список | pgsql-sql |
ivan marchesini <marchesini@unipg.it> schrieb: > Dear all... > I have created a check constraint without giving it a name.. > now I have a check named "$25" in my table that I need to drop or > modify!!! > How can I do??? Can you see the name with \d <table> within psql? An example: test=# create table bla (id int check (id between 1 and 4)); CREATE TABLE test=# \d bla Table "public.bla"Column | Type | Modifiers --------+---------+-----------id | integer | Check constraints: "bla_id_check" CHECK (id >= 1 AND id <= 4) test=# alter table bla drop CONSTRAINT bla_id_check; ALTER TABLE test=# \d bla Table "public.bla"Column | Type | Modifiers --------+---------+-----------id | integer | HTH, Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would recompile penguin with --enable-fly." (unknow) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°
В списке pgsql-sql по дате отправления: