mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
Standardize get_whatever_oid functions for object types with
unqualified names. - Add a missing_ok parameter to get_tablespace_oid. - Avoid duplicating get_tablespace_od guts in objectNamesToOids. - Add a missing_ok parameter to get_database_oid. - Replace get_roleid and get_role_checked with get_role_oid. - Add get_namespace_oid, get_language_oid, get_am_oid. - Refactor existing code to use new interfaces. Thanks to KaiGai Kohei for the review.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/commands/foreigncmds.c,v 1.11 2010/02/14 18:42:14 rhaas Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/commands/foreigncmds.c,v 1.12 2010/08/05 14:45:00 rhaas Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -184,7 +184,7 @@ GetUserOidFromMapping(const char *username, bool missing_ok)
|
||||
return GetUserId();
|
||||
|
||||
/* map to provided user */
|
||||
return missing_ok ? get_roleid(username) : get_roleid_checked(username);
|
||||
return get_role_oid(username, missing_ok);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user