From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Use LEFT JOINs in some system views in case referenced row doesn
Date: Fri, 19 Aug 2016 21:13:52 +0000
Message-ID: <E1bar6u-0003s8-2k@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Use LEFT JOINs in some system views in case referenced row doesn't exist.
In particular, left join to pg_authid so that rows in pg_stat_activity
don't disappear if the session's owning user has been dropped.
Also convert a few joins to pg_database to left joins, in the same spirit,
though that case might be harder to hit. We were doing this in other
views already, so it was a bit inconsistent that these views didn't.
Oskari Saarenmaa, with some further tweaking by me
Discussion: <56E87CD8.60007@ohmu.fi>
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/8299471c37fff0b0f5a777a12f920125310c0efe
Modified Files
--------------
src/backend/catalog/system_views.sql | 20 +++++++++-----------
src/include/catalog/catversion.h | 2 +-
src/test/regress/expected/rules.out | 20 +++++++++-----------
3 files changed, 19 insertions(+), 23 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Use LEFT JOINs in some system views in case referenced row doesn
In-Reply-To: <E1bar6u-0003s8-2k@gemulon.postgresql.org>
References: <E1bar6u-0003s8-2k@gemulon.postgresql.org>
* 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