Re: dropping anonymous constraints

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ben Liblit <liblit(at)eecs(dot)berkeley(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: dropping anonymous constraints
Date: 2002-07-17 05:12:26
Message-ID: 11288.1026882746@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ben Liblit <liblit(at)eecs(dot)berkeley(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Lockhart 2002-07-17 05:21:04 Re: OIDs (Or: another RTFM question?)
Previous Message Phil Geer 2002-07-17 04:35:11 Re: Logging SQL queries?