Re: dropping anonymous constraints

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ben Liblit <liblit@eecs.berkeley.edu>
Cc: pgsql-general@postgresql.org
Date: 2002-07-17T05:12:26Z
Lists: pgsql-general
Ben Liblit <liblit@eecs.berkeley.edu> writes:
> Given a table "data" with column "value", one can add a constraint that 
> has no name:
>      ALTER TABLE data ADD CHECK (value > 0);
> How, then, does one remove this constraint?

The constraint *does* have a name, it's just an auto-assigned one
(probably of the form "$n").  Try psql's \d command to check out
constraint names.

			regards, tom lane