mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Add "pg_database_owner" default role.
Membership consists, implicitly, of the current database owner. Expect use in template databases. Once pg_database_owner has rights within a template, each owner of a database instantiated from that template will exercise those rights. Reviewed by John Naylor. Discussion: https://postgr.es/m/20201228043148.GA1053024@rfd.leadboat.com
This commit is contained in:
6
src/backend/utils/cache/catcache.c
vendored
6
src/backend/utils/cache/catcache.c
vendored
@ -1076,8 +1076,9 @@ InitCatCachePhase2(CatCache *cache, bool touch_index)
|
||||
* criticalRelcachesBuilt), we don't have to worry anymore.
|
||||
*
|
||||
* Similarly, during backend startup we have to be able to use the
|
||||
* pg_authid and pg_auth_members syscaches for authentication even if
|
||||
* we don't yet have relcache entries for those catalogs' indexes.
|
||||
* pg_authid, pg_auth_members and pg_database syscaches for
|
||||
* authentication even if we don't yet have relcache entries for those
|
||||
* catalogs' indexes.
|
||||
*/
|
||||
static bool
|
||||
IndexScanOK(CatCache *cache, ScanKey cur_skey)
|
||||
@ -1110,6 +1111,7 @@ IndexScanOK(CatCache *cache, ScanKey cur_skey)
|
||||
case AUTHNAME:
|
||||
case AUTHOID:
|
||||
case AUTHMEMMEMROLE:
|
||||
case DATABASEOID:
|
||||
|
||||
/*
|
||||
* Protect authentication lookups occurring before relcache has
|
||||
|
Reference in New Issue
Block a user