From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Alexander Farber <alexander.farber@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: How to always run UPDATE FROM despite missing records in the source table?
Date: Sun, 13 Jan 2019 11:25:53 +0000
Message-ID: <87r2dgn8l6.fsf@news-spur.riddles.org.uk> (raw)
In-Reply-To: <CAADeyWjFNLPDqjuLhX0hr1i-VTpyAqTNiPs4V6__YAvT-LabeQ@mail.gmail.com>
References: <CAADeyWh-_Co2h9oq2vp=qMoGAwyMH3v7FG9BFMG0WwKP-b_u4A@mail.gmail.com>
<1f962321-5973-fe09-e52f-182115296555@aklaver.com>
<CAADeyWjFNLPDqjuLhX0hr1i-VTpyAqTNiPs4V6__YAvT-LabeQ@mail.gmail.com>
>>>>> "Alexander" == Alexander Farber <alexander.farber@gmail.com> writes:
Alexander> even though I wonder what is the (VALUES
Alexander> ('20.20.20.20'::inet)) v(ip) construct there, some temporary
Alexander> table which is then LEGT JOINed to the geoip table?
The SQL spec calls it a <table value constructor>. The VALUES clause
behaves like a SELECT that returns a fixed number of rows (1 or more)
whose columns contain the results of the specified expressions. The
v(ip) part is just a table and column alias (I omitted the optional AS
keyword out of long habit) to name the constructed table.
--
Andrew (irc:RhodiumToad)
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: andrew@tao11.riddles.org.uk, alexander.farber@gmail.com
Subject: Re: How to always run UPDATE FROM despite missing records in the source table?
In-Reply-To: <87r2dgn8l6.fsf@news-spur.riddles.org.uk>
References: <CAADeyWh-_Co2h9oq2vp=qMoGAwyMH3v7FG9BFMG0WwKP-b_u4A@mail.gmail.com> <1f962321-5973-fe09-e52f-182115296555@aklaver.com> <CAADeyWjFNLPDqjuLhX0hr1i-VTpyAqTNiPs4V6__YAvT-LabeQ@mail.gmail.com> <87r2dgn8l6.fsf@news-spur.riddles.org.uk>
* 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