Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 2D7A99FB68C for ; Mon, 13 Nov 2006 14:54:17 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 55736-05-6 for ; Mon, 13 Nov 2006 18:53:46 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from 137086.vserver.de (vs137086.vserver.de [62.75.137.86]) by postgresql.org (Postfix) with ESMTP id 4C1AA9FB298 for ; Mon, 13 Nov 2006 14:33:56 -0400 (AST) Received: from a-kretschmer.de (p54B382D3.dip0.t-ipconnect.de [84.179.130.211]) (authenticated bits=0) by 137086.vserver.de (8.12.8/8.12.8) with ESMTP id kADIXsFW032627 for ; Mon, 13 Nov 2006 19:33:58 +0100 Received: from kretschmer by a-kretschmer.de with local (Exim 4.61) (envelope-from ) id 1Gjgd7-0008HE-G5 for pgsql-sql@postgresql.org; Mon, 13 Nov 2006 19:34:01 +0100 Date: Mon, 13 Nov 2006 19:34:01 +0100 From: Andreas Kretschmer To: pgsql-sql@postgresql.org Subject: Re: drop a check Message-ID: <20061113183401.GA31078@KanotixBox> References: <1163435526.6395.27.camel@geoivan> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1163435526.6395.27.camel@geoivan> X-OS: Debian/GNU Linux - weil ich es mir Wert bin! X-GPG-Fingerprint: EE16 3C01 7B9C 10F7 2C8B 3B86 4DB3 D9EE 7F45 84DA X-Message-Flag: "Windows" is not the answer. "Windows" is the question and the answer is "no"! X-Lugdd: Gerd Kube X-Info: My name is root. Just root. And I am licensed to kill -9 User-Agent: mutt-ng 1.5.9i (Linux) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/141 X-Sequence-Number: 26793 ivan marchesini 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 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°