Re: dropping anonymous constraints - Mailing list pgsql-general

From Tom Lane
Subject Re: dropping anonymous constraints
Date
Msg-id 11288.1026882746@sss.pgh.pa.us
Whole thread Raw
In response to dropping anonymous constraints  (Ben Liblit <liblit@eecs.berkeley.edu>)
Responses Re: dropping anonymous constraints
List 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

pgsql-general by date:

Previous
From: Justin Clift
Date:
Subject: Re: ? about Installation of Postgresql
Next
From: Thomas Lockhart
Date:
Subject: Re: OIDs (Or: another RTFM question?)