| From: | Vincent Frison <turman(at)ohmforce(dot)com> |
|---|---|
| To: | pgsql-novice(at)postgresql(dot)org |
| Subject: | Renaming unnamed FK constraints |
| Date: | 2006-04-17 00:34:56 |
| Message-ID: | 200604170234.56775.turman@ohmforce.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
Hello,
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..
This is very hapless since unnamed constraints are totally ignored from a lot
of SQL clients (PgAdmin3, TOra, SQuirreL...). The only solution seems to
rename all these constraints but I didn't find how to do it. I see somewhere
in this ML that I should drop all the triggers related to RI (and then
recreate all FKs with "ALTER TABLE" with named constraints). But it looks
like a plodding task isn't it?
Am I the only one who uses "REFERENCES TABLE..." directly into "CREATE TABLE"
statements? Should I go to evil for that? ;)
Thanks.
Vincent.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2006-04-17 01:43:32 | Re: Renaming unnamed FK constraints |
| Previous Message | Frank Bax | 2006-04-16 12:19:54 | Re: Crontab problem with backup |