| From: | Michael Fuhr <mike(at)fuhr(dot)org> |
|---|---|
| To: | sarlav kumar <sarlavk(at)yahoo(dot)com> |
| Cc: | pgsqlnovice <pgsql-novice(at)postgresql(dot)org> |
| Subject: | Re: FK relationships |
| Date: | 2005-01-12 21:22:39 |
| Message-ID: | 20050112212239.GA27372@winnie.fuhr.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
On Wed, Jan 12, 2005 at 01:01:17PM -0800, sarlav kumar wrote:
> update pg_constraint set conname='customer_facts_uid_fkey'
> where confrelid='customer'::regclass and conrelid='customer_facts'::regclass;
Note that if a table has multiple constraints then this update will
try to rename all of them to the same name.
> Is this going to cause any trouble in future?
I don't know about this case, but fiddling with the system tables
can cause problems due to subtle relationships you're not aware of,
and it can have catastrophic consequences if you make a mistake.
Avoid it if possible.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Schuhmacher, Bret | 2005-01-13 00:22:41 | Ampersands in the output... |
| Previous Message | sarlav kumar | 2005-01-12 21:01:17 | Re: FK relationships |