Re: Thoughts on how to avoid a massive integer update.
От | Rob Sargent |
---|---|
Тема | Re: Thoughts on how to avoid a massive integer update. |
Дата | |
Msg-id | 7171C32C-B8BC-4721-9938-8F6BA4E38BC7@gmail.com обсуждение исходный текст |
Ответ на | Re: Thoughts on how to avoid a massive integer update. ("David G. Johnston" <david.g.johnston@gmail.com>) |
Ответы |
Re: Thoughts on how to avoid a massive integer update.
|
Список | pgsql-general |
On May 8, 2020, at 2:37 PM, David G. Johnston <david.g.johnston@gmail.com> wrote:On Fri, May 8, 2020 at 12:49 PM Rob Sargent <robjsargent@gmail.com> wrote:Well as I said, I think you could add a column to info_tablealter table info_table add orig_id int;update info_table set orig_id = info_table_sid;update info_table set info_table_sid = 456 where info_table_sid = 456;huh?alter table data_table drop reference NOT SQLalter table data_table make reference to info_table.orig_id NOT SQLYou don't seem to understand the requirement. The data_table integer value must be changed - all you are doing is a convoluted column rename on the table holding the PK half of the relationship.David J.
В списке pgsql-general по дате отправления: