Re: question on renaming a foreign key - Mailing list pgsql-general

From Ron Johnson
Subject Re: question on renaming a foreign key
Date
Msg-id 452D8692.5070400@cox.net
Whole thread Raw
In response to Re: question on renaming a foreign key  (Richard Broersma Jr <rabroersma@yahoo.com>)
Responses Re: question on renaming a foreign key
List pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/11/06 18:53, Richard Broersma Jr wrote:
>>>> can anyone suggest a non-nightmarish way for me to do this
>>>> ?
>>> If your tables are setup to "ON UPDATE CASCASE" then you are
>>> fine. Just updated the main table and PostgreSQL will take
>>> care of the rest.
>
>> I doesn't appear that ALTER TABLE can change constraint
>> characteristics. You'd have to drop/recreate, no?
>
> Now that you mention it, I've never tried it or seen it done.
> Here I what I came up with:
>
[snip]
>
>
> It is nice to see things work so well. :-)

It would be interesting to see how well it works on a 50M row table.

- --
Ron Johnson, Jr.
Jefferson LA  USA

Is "common sense" really valid?
For example, it is "common sense" to white-power racists that
whites are superior to blacks, and that those with brown skins
are mud people.
However, that "common sense" is obviously wrong.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFLYaSS9HxQb37XmcRAmO+AKDH1ILeOKJEYitfY6LUTrRZKjk33wCdGIZW
ZN0L1iAJphWTNGlAoz63E3E=
=3zQr
-----END PGP SIGNATURE-----

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: database corruption question
Next
From: Geoffrey
Date:
Subject: Re: more anti-postgresql FUD