pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Karsten Hilbert <Karsten.Hilbert@gmx.net>
To: pgsql-general@lists.postgresql.org
Cc: Greg Sabino Mullane <htamfids@gmail.com>
Subject: Re: "reverse" (?) UPSERT -- how to ?
Date: Sat, 17 Feb 2024 19:29:32 +0100
Message-ID: <ZdD7DMe_vb0FCOcn@hermes.hilbert.loc> (raw)
In-Reply-To: <ZdD6B1DphHk9TIps@hermes.hilbert.loc>
References: <ZdDPpWxB6IH_Dx1b@hermes.hilbert.loc>
	<CAKAnmmL2o6eLMu11voLJ8rAH15Hj9O1joKN2Kt8S3YV3WmHiTQ@mail.gmail.com>
	<ZdD6B1DphHk9TIps@hermes.hilbert.loc>

Am Sat, Feb 17, 2024 at 07:25:11PM +0100 schrieb Karsten Hilbert:

> +1  except that I've got use for both parts of the UNION on
> their own (they are both views themselves involving a bunch
> of joins with yet other tables, 4 or 5 each or so ;-)

Just for kicks, attached find the SQL change script ...

Using a LEFT JOIN would get unwieldy, fast, I guess.

Karsten
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B

Attachments:

  v23-clin-v_intakes_with_regimens.sql (application/sql, 6.7K) download

view thread (8+ messages)

Message-ID: <ZdD7DMe_vb0FCOcn@hermes.hilbert.loc>
Permalink:  ../ZdD7DMe_vb0FCOcn@hermes.hilbert.loc/
Also on:    postgresql.org/message-id/ZdD7DMe_vb0FCOcn@hermes.hilbert.loc

 · 

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: Karsten.Hilbert@gmx.net, htamfids@gmail.com
  Subject: Re: "reverse" (?) UPSERT -- how to ?
  In-Reply-To: <ZdD7DMe_vb0FCOcn@hermes.hilbert.loc>
  References: <ZdDPpWxB6IH_Dx1b@hermes.hilbert.loc> <CAKAnmmL2o6eLMu11voLJ8rAH15Hj9O1joKN2Kt8S3YV3WmHiTQ@mail.gmail.com> <ZdD6B1DphHk9TIps@hermes.hilbert.loc> <ZdD7DMe_vb0FCOcn@hermes.hilbert.loc>

* 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