Re: Getting FK relationships from information_schema

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kyle <kyle(at)actarg(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: Getting FK relationships from information_schema
Date: 2004-06-09 05:04:47
Message-ID: 16089.1086757487@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Kyle <kyle(at)actarg(dot)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?

(Of course, this is only a long-term fix for your original problem,
as it'll take a good long while for any such naming change to propagate
to Joe's-Corner-Bar's database.)

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message mixo 2004-06-09 06:24:25 Last insert id
Previous Message Stephan Szabo 2004-06-08 23:18:07 Re: simple addition of constraints problem