Re: Updating PK and all FKs to it in CTE

2021-07-29 Thread Tom Kazimiers
On Thu, Jul 29, 2021 at 10:51:09AM -0400, Tom Lane wrote: I tried to reproduce your problem and failed; the attached script acts as I'd expect. So there must be some moving part you've not mentioned. Can yo create a similar self-contained example that fails? Thanks very much for trying this.

Re: Updating PK and all FKs to it in CTE

2021-07-29 Thread Tom Lane
Tom Kazimiers writes: > I am on Postgres 13 and have a problem with updates in a CTE. While certainly > not generally recommended, I need to update the primary key in a table that is > referenced by a few other tables. The table definition is attached to the end > of this email [2]. I'd like to av

Updating PK and all FKs to it in CTE

2021-07-29 Thread Tom Kazimiers
Hi all, I am on Postgres 13 and have a problem with updates in a CTE. While certainly not generally recommended, I need to update the primary key in a table that is referenced by a few other tables. The table definition is attached to the end of this email [2]. I'd like to avoid dropping and recr