pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fehrle, Brian <bfehrle@comscore.com>
To: Rob Sargent <robjsargent@gmail.com>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: Thoughts on how to avoid a massive integer update.
Date: Fri, 8 May 2020 19:36:18 +0000
Message-ID: <8491BCF6-2163-4765-BCCF-E96B845D7427@comscore.com> (raw)
In-Reply-To: <E3B6D3D1-D60E-40D9-8855-B23F7EDBFA8E@gmail.com>
References: <C7D3EE42-66B9-44AF-83F4-CB7F0F42486E@comscore.com>
	<129e882d-fe4c-0ce9-1966-acbcbf94c309@aklaver.com>
	<0F5992D4-9317-4007-9036-202DC89BA0D8@comscore.com>
	<E3B6D3D1-D60E-40D9-8855-B23F7EDBFA8E@gmail.com>



From: Rob Sargent <robjsargent@gmail.com>
Date: Friday, May 8, 2020 at 11:05 AM
To: "Fehrle, Brian" <bfehrle@comscore.com>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>, "pgsql-general@postgresql.org" <pgsql-general@postgresql.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.


view thread (19+ messages)  latest in thread

Message-ID: <8491BCF6-2163-4765-BCCF-E96B845D7427@comscore.com>
Permalink:  ../8491BCF6-2163-4765-BCCF-E96B845D7427@comscore.com/
Also on:    postgresql.org/message-id/8491BCF6-2163-4765-BCCF-E96B845D7427@comscore.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: bfehrle@comscore.com, robjsargent@gmail.com, adrian.klaver@aklaver.com
  Subject: Re: Thoughts on how to avoid a massive integer update.
  In-Reply-To: <8491BCF6-2163-4765-BCCF-E96B845D7427@comscore.com>
  References: <C7D3EE42-66B9-44AF-83F4-CB7F0F42486E@comscore.com> <129e882d-fe4c-0ce9-1966-acbcbf94c309@aklaver.com> <0F5992D4-9317-4007-9036-202DC89BA0D8@comscore.com> <E3B6D3D1-D60E-40D9-8855-B23F7EDBFA8E@gmail.com> <8491BCF6-2163-4765-BCCF-E96B845D7427@comscore.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox