pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Volkan YAZICI <yazicivo@ttnet.net.tr>
To: ivan marchesini <marchesini@unipg.it>
Cc: pgsql-sql@postgresql.org
Subject: Re: drop a check
Date: Mon, 13 Nov 2006 21:01:53 +0200
Message-ID: <20061113190153.GC1403@alamut> (raw)
In-Reply-To: <1163439507.15503.15.camel@geoivan>
References: <1163435526.6395.27.camel@geoivan>
	<20061113174138.GB1403@alamut>
	<1163439507.15503.15.camel@geoivan>

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.



view thread (7+ messages)  latest in thread

Message-ID: <20061113190153.GC1403@alamut>
Permalink:  ../20061113190153.GC1403@alamut/
Also on:    postgresql.org/message-id/20061113190153.GC1403@alamut

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: yazicivo@ttnet.net.tr, marchesini@unipg.it
  Subject: Re: drop a check
  In-Reply-To: <20061113190153.GC1403@alamut>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox