Re: RFC: Generating useful names for foreign keys and checks - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: RFC: Generating useful names for foreign keys and checks
Date
Msg-id GNELIHDDFBOCMGBFGEFOEECGCCAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to Re: RFC: Generating useful names for foreign keys and checks  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> Actually I'm in favor of it.  I have a proposal outstanding to require
> constraints to have names that are unique per-table, for consistency
> with triggers (already are that way) and rules (will become that way,
> rather than having globally unique names as now).  AFAIR the only
> significant concern was making sure that the system wouldn't generate
> duplicate constraint names by default.

Yeah, that's what's giving me pain - foreign key names are generated in the
rewriter or something somewhere, so I'm not sure exactly what I have access
to for checking duplicates...

The other interesting issue is the the little suffix we append is just in
the name.  ie. someone can create an index called '_pkey' and cause
confusion.

Chris



pgsql-hackers by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: [PATCHES] ANSI Compliant Inserts
Next
From: Thomas Lockhart
Date:
Subject: Re: Stumbled upon a time bug...