From: | Volkan YAZICI <yazicivo(at)ttnet(dot)net(dot)tr> |
---|---|
To: | ivan marchesini <marchesini(at)unipg(dot)it> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: drop a check |
Date: | 2006-11-13 19:01:53 |
Message-ID: | 20061113190153.GC1403@alamut |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Nov 13 06:38, ivan marchesini wrote:
> thank you for your answer...
> I have tried to verify the table
> information_schema.constraint_column_usage, but, and I was really
> surprised, I have found nothing inside it..
> it seems there are not checks!!!
> I have also seen the manual page you suggested but I can't understand
> why I don't have checks in this table...
>
> but I'm sure I have checks in my table.. because they works!!!!!
> does this problem can be related to the fact that I have created the
> checks only after that I have created the table...
> I have used this syntacs:
> alter table tablename add check (......)
I tried to produce same strange behaviour with no luck:
test=# CREATE TABLE cons_test (u int);
CREATE TABLE
test=# ALTER TABLE cons_test
test-# ADD CONSTRAINT forget_my_name CHECK (u > 10);
ALTER TABLE
test=# SELECT constraint_name
test-# FROM information_schema.constraint_column_usage
test-# WHERE table_name = 'cons_test' AND
test-# column_name = 'u';
constraint_name
-----------------
forget_my_name
(1 row)
Also, you cannot see that constraint listed in the \d table_name output,
ain't? Maybe you should try a hardcoded search over consrc column of
pg_catalog.pg_constraint table.
Regards.
From | Date | Subject | |
---|---|---|---|
Next Message | imad | 2006-11-13 19:04:12 | Re: Another question about composite types |
Previous Message | Andreas Kretschmer | 2006-11-13 18:34:01 | Re: drop a check |