pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Slick way to update multiple tables.
Date: Sat, 3 Apr 2021 21:10:08 -0500
Message-ID: <cfa99b67-50e1-47f7-a687-f1945c82f0a9@gmail.com> (raw)
In-Reply-To: <CAPDmd-AQ9M_DGEuttxB25TGCkQxT=WqU=p4_0AVKVTiJNBfbLA@mail.gmail.com>
References: <CAPDmd-AQ9M_DGEuttxB25TGCkQxT=WqU=p4_0AVKVTiJNBfbLA@mail.gmail.com>

On 4/1/21 11:16 AM, Theodore M Rolle, Jr. wrote:
> I SELECT items from three tables.
>
> It seems that the only way to put updated fields into their proper table 
> is to query /each/ field, then UPDATE /each/ table.
>
> Am I missing something here?
> Is there a way to do this automatically?
>

Did you join the three tables when querying?

-- 
Angular momentum makes the world go 'round.

view thread (7+ messages)

Message-ID: <cfa99b67-50e1-47f7-a687-f1945c82f0a9@gmail.com>
Permalink:  ../cfa99b67-50e1-47f7-a687-f1945c82f0a9@gmail.com/
Also on:    postgresql.org/message-id/cfa99b67-50e1-47f7-a687-f1945c82f0a9@gmail.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: ronljohnsonjr@gmail.com
  Subject: Re: Slick way to update multiple tables.
  In-Reply-To: <cfa99b67-50e1-47f7-a687-f1945c82f0a9@gmail.com>
  References: <CAPDmd-AQ9M_DGEuttxB25TGCkQxT=WqU=p4_0AVKVTiJNBfbLA@mail.gmail.com> <cfa99b67-50e1-47f7-a687-f1945c82f0a9@gmail.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