Re: question on renaming a foreign key

Поиск
Список
Период
Сортировка
От Ron Johnson
Тема Re: question on renaming a foreign key
Дата
Msg-id 452D7A94.5030104@cox.net
обсуждение исходный текст
Ответ на Re: question on renaming a foreign key  (Richard Broersma Jr <rabroersma@yahoo.com>)
Ответы Re: question on renaming a foreign key  (Richard Broersma Jr <rabroersma@yahoo.com>)
Список pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/11/06 16:10, Richard Broersma Jr wrote:
>> I made a  HUGE mistake, and used 'UK' as the abbreviation for the
>> united kingdom ( the ISO abbv is 'GB' )
>>
>> I've got a database where 8 tables have an FKEY on a table
>> 'location_country' , using the text 'uk' as the value -- so i've got
>> 9 tables that I need to swap data out on
>>
>> 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?

- --
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)

iD8DBQFFLXqUS9HxQb37XmcRAhNZAJ9sNEgOoEivv89oVuH5yF7rm71ztQCeM9Cn
r6BtOzSoE3+4SxvAlu7teDk=
=KxPL
-----END PGP SIGNATURE-----

В списке pgsql-general по дате отправления:

Предыдущее
От: Tim Tassonis
Дата:
Сообщение: Re: more anti-postgresql FUD
Следующее
От: "George Pavlov"
Дата:
Сообщение: Re: query log corrupted-looking entries