Use LEFT JOINs in some system views in case referenced row doesn't exist.
Tom Lane <tgl@sss.pgh.pa.us>
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>
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/catalog/system_views.sql | modified | +9 −11 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/test/regress/expected/rules.out | modified | +9 −11 |