pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Kyle <kyle@actarg.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Getting FK relationships from information_schema
Date: Wed, 9 Jun 2004 08:36:25 +0200
Message-ID: <200406090836.25473.peter_e@gmx.net> (raw)
In-Reply-To: <16089.1086757487@sss.pgh.pa.us>
References: <40C500D8.9060009@actarg.com>
	<40C5D790.6090407@actarg.com>
	<16089.1086757487@sss.pgh.pa.us>

Tom Lane wrote:
> Kyle <kyle@actarg.com> writes:
> > I think this is only an issue when the user relies on postgres to
> > choose a constraint name automatically.  Seems like a reasonable
> > approach would be to have postgres choose a name for the constraint
> > that happens to be unique in the schema (like tablename_fkey_$1).
>
> We have discussed changing the default names of FK constraints
> before. I have no problem with doing something like the above --- any
> objection out there?

I think it's a good idea.  It will also make the error messages of the 
kind "foreign key $1 violated" a bit clearer by default.

There will, however, be complaints that the constraint names are not 
automatically renamed with the table; but we are used to those by now.




view thread (6+ messages)  latest in thread

Message-ID: <200406090836.25473.peter_e@gmx.net>
Permalink:  ../200406090836.25473.peter_e@gmx.net/
Also on:    postgresql.org/message-id/200406090836.25473.peter_e@gmx.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: peter_e@gmx.net, tgl@sss.pgh.pa.us, kyle@actarg.com
  Subject: Re: Getting FK relationships from information_schema
  In-Reply-To: <200406090836.25473.peter_e@gmx.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox