Re: Uniqueness of rule, constraint, and trigger names - Mailing list pgsql-sql

From Christopher Kings-Lynne
Subject Re: Uniqueness of rule, constraint, and trigger names
Date
Msg-id GNELIHDDFBOCMGBFGEFOOEJOCBAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to Uniqueness of rule, constraint, and trigger names  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
> 2. Constraints are not required to have any unique name at all.
> Dropping constraints is done with "ALTER TABLE tablename DROP CONSTRAINT
> constraintname", which will drop all constraints on that table that
> match the given name.

Personally, I'd like to see CHECK contraints given decent names (eg.
mytable_fullname_chk) instead of '$1', '$2', etc.  This makes it much easier
to use DROP CONSTRAINT...

Also, when it comes time to let people drop FOREIGN KEY constraints, it
might be a problem that they're all generated as '<unnamed>' at the
moment...

Chris



pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Changing sequence cache
Next
From: "Andrew G. Hammond"
Date:
Subject: Re: Changing sequence cache