]> granicus.if.org Git - postgresql/commit
Use LEFT JOINs in some system views in case referenced row doesn't exist.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 19 Aug 2016 21:13:47 +0000 (17:13 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 19 Aug 2016 21:13:47 +0000 (17:13 -0400)
commit8299471c37fff0b0f5a777a12f920125310c0efe
tree06544621316dc0a644472e62d11cf5e5cfb8118c
parent65a603e90328a7a8fb3ab30ed96f24bf8eb4cf84
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>
src/backend/catalog/system_views.sql
src/include/catalog/catversion.h
src/test/regress/expected/rules.out