Re: RFC: Generating useful names for foreign keys and checks

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: RFC: Generating useful names for foreign keys and checks
Date: 2002-04-16 02:58:13
Message-ID: GNELIHDDFBOCMGBFGEFOEECGCCAA.chriskl@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-04-16 02:58:51 Re: [SQL] 16 parameter limit
Previous Message Bruce Momjian 2002-04-16 02:46:23 Re: ANSI Compliant Inserts