Re: Thoughts on how to avoid a massive integer update.

From: "Fehrle, Brian" <bfehrle(at)comscore(dot)com>
To: Rob Sargent <robjsargent(at)gmail(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Thoughts on how to avoid a massive integer update.
Date: 2020-05-08 19:36:18
Message-ID: 8491BCF6-2163-4765-BCCF-E96B845D7427@comscore.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

From: Rob Sargent <robjsargent(at)gmail(dot)com>
Date: Friday, May 8, 2020 at 11:05 AM
To: "Fehrle, Brian" <bfehrle(at)comscore(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Thoughts on how to avoid a massive integer update.

[External Email]
Could you show an example table relationship?

It’s a simple one-to-many relationship:
*Info_table*
info_table_sid integer

*data_table*
data_table_sid integer,
info_table_id integer references info_table(info_table_sid),

Right, and now you wish to change the values in the referenced table (info_table.info_table_sid) correct?

Correct. If info_table.info_table_sid = 123 and many rows in data_table point to it, the ID needs to be changed to 456 in the info_table, as well as all the columns in the data_table.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2020-05-08 19:49:07 Re: Thoughts on how to avoid a massive integer update.
Previous Message Fehrle, Brian 2020-05-08 19:35:13 Re: Thoughts on how to avoid a massive integer update.