Re: Renaming unnamed FK constraints

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Vincent Frison <turman(at)ohmforce(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Renaming unnamed FK constraints
Date: 2006-04-17 01:43:32
Message-ID: 20206.1145238212@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Vincent Frison <turman(at)ohmforce(dot)com> writes:
> I've created my referential integrity with "REFERENCES TABLE..." directly
> into "CREATE TABLE" statements. I don't have used "ALTER TABLE" with "ADD
> CONSTRAINT constraint_name..." so I have only unnamed constraint for all my
> FKs. Maybe I has been to much lazy..

There's no such thing as an unnamed constraint ... PG would have
generated names for them. If you're using an old PG version, the
names might look ugly (like "$1"), but they're there.

> This is very hapless since unnamed constraints are totally ignored
> from a lot of SQL clients (PgAdmin3, TOra, SQuirreL...).

Perhaps a name like "$1" would confuse some of those clients, but I
hardly believe it for PgAdmin. What problem are you seeing *exactly*?

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Shoaib Mir 2006-04-17 12:12:07 Re: Install password not recognized
Previous Message Vincent Frison 2006-04-17 00:34:56 Renaming unnamed FK constraints