From: Achilleas Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Use ctid in where clause in update from statement
Date: Mon, 1 Jul 2019 12:27:16 +0300
Message-ID: <73fbdc2d-36cc-a96a-5019-f7c78876ed8d@matrix.gatewaynet.com> (raw)
In-Reply-To: <C8D480EC-AFF2-40CC-8BD3-754A1204011A@mikatiming.de>
References: <C8D480EC-AFF2-40CC-8BD3-754A1204011A@mikatiming.de>
On 1/7/19 12:13 μ.μ., Dirk Mika wrote:
>
> Hello,
>
> I come from the Oracle world and am trying to convert some queries to PostgreSQL syntax. One of these queries is a MERGE statement, which I converted into an UPDATE SET FROM WHERE construct. In the
> original query I use the pseudo column ROWID to match a source row with a target row.
>
> This is a simplified version of such a query:
>
Postgresql supports upserts : https://www.postgresql.org/docs/11/sql-insert.html "ON CONFLICT"
> BR
>
> Dirk
>
> --
> Dirk Mika
> /Software Developer
>
> /
>
>
>
> mika:timing GmbH
> Strundepark - Kürtener Str. 11b
> 51465 Bergisch Gladbach
> Germany
>
> fon +49 2202 2401-1197
> dirk.mika@mikatiming.de
> www.mikatiming.de
>
> AG Köln HRB 47509 * WEEE-Reg.-Nr. DE 90029884
> Geschäftsführer: Harald Mika, Jörg Mika
>
>
>
>
> <https://youtu.be/qfOFXrpSKLQ;
>
>
--
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt
Attachments:image001_d0a5cf51-5dd3-4ff5-b428-1016a6d95a0f.png (image/png, 1.7K) downloadview imageCCh2U_f27a5ce6-8556-4db1-8aa4-fd610d6e9efe.jpg (image/jpeg, 107.2K) downloadview image
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: achill@matrix.gatewaynet.com
Subject: Re: Use ctid in where clause in update from statement
In-Reply-To: <73fbdc2d-36cc-a96a-5019-f7c78876ed8d@matrix.gatewaynet.com>
References: <C8D480EC-AFF2-40CC-8BD3-754A1204011A@mikatiming.de> <73fbdc2d-36cc-a96a-5019-f7c78876ed8d@matrix.gatewaynet.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