Received: from localhost (uranus.hub.org [200.46.204.60]) by postgresql.org (Postfix) with ESMTP id 007E99FA217 for ; Mon, 13 Nov 2006 15:03:13 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.60]) (amavisd-new, port 10024) with ESMTP id 53508-07 for ; Mon, 13 Nov 2006 15:03:11 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from fep04.ttnet.net.tr (mail.ttnet.net.tr [212.175.13.129]) by postgresql.org (Postfix) with ESMTP id 7CF789FA12B for ; Mon, 13 Nov 2006 15:03:10 -0400 (AST) Received: from (unknown [192.168.8.104]) by AVGW-I-2.ttnet.net.tr with smtp id 460e_9a60e760_7349_11db_8ee9_001422175ed8; Mon, 13 Nov 2006 21:03:10 +0200 Received: from alamut ([85.97.155.105]) by fep04.ttnet.net.tr with ESMTP id <20061113190309.KMWS13992.fep04.ttnet.net.tr@alamut>; Mon, 13 Nov 2006 21:03:09 +0200 Received: from (dsl.dynamic8597155105.ttnet.net.tr [85.97.155.105]) by AVGW-I-2.ttnet.net.tr with smtp id 45ee_99862396_7349_11db_9ff7_001422175ed8; Mon, 13 Nov 2006 21:03:08 +0200 Date: Mon, 13 Nov 2006 21:01:53 +0200 From: Volkan YAZICI To: ivan marchesini Cc: pgsql-sql@postgresql.org Subject: Re: drop a check Message-ID: <20061113190153.GC1403@alamut> References: <1163435526.6395.27.camel@geoivan> <20061113174138.GB1403@alamut> <1163439507.15503.15.camel@geoivan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1163439507.15503.15.camel@geoivan> User-Agent: Mutt/1.4.2.1i X-NAI-Spam-Rules: 1 Rules triggered BAYES_10=-0.7 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.405 tagged_above=0 required=5 tests=AWL, BAYES_50, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, DNS_FROM_RFC_WHOIS X-Spam-Level: * X-Archive-Number: 200611/144 X-Sequence-Number: 26796 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.