Re: drop a check - Mailing list pgsql-sql

From Volkan YAZICI
Subject Re: drop a check
Date
Msg-id 20061113190153.GC1403@alamut
Whole thread Raw
In response to Re: drop a check  (ivan marchesini <marchesini@unipg.it>)
List 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.


pgsql-sql by date:

Previous
From: ivan marchesini
Date:
Subject: Re: drop a check
Next
From: imad
Date:
Subject: Re: Another question about composite types