diff options
| author | Robert Haas | 2010-08-05 14:45:09 +0000 |
|---|---|---|
| committer | Robert Haas | 2010-08-05 14:45:09 +0000 |
| commit | 2a6ef3445c73473edb222abf108b323fb7f002dc (patch) | |
| tree | ca6a6f51dcf5193303f466c4072b243e3f979227 /src/backend/libpq | |
| parent | 641459f26954b04f74d098a758b716297b6554ea (diff) | |
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.
Diffstat (limited to 'src/backend/libpq')
| -rw-r--r-- | src/backend/libpq/hba.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index 4e1cff3502c..3aa718b3569 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.209 2010/07/06 19:18:56 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.210 2010/08/05 14:45:03 rhaas Exp $ * *------------------------------------------------------------------------- */ @@ -459,7 +459,7 @@ is_member(Oid userid, const char *role) if (!OidIsValid(userid)) return false; /* if user not exist, say "no" */ - roleid = get_roleid(role); + roleid = get_role_oid(role, true); if (!OidIsValid(roleid)) return false; /* if target role not exist, say "no" */ @@ -1328,7 +1328,7 @@ check_hba(hbaPort *port) HbaLine *hba; /* Get the target role's OID. Note we do not error out for bad role. */ - roleid = get_roleid(port->user_name); + roleid = get_role_oid(port->user_name, true); foreach(line, parsed_hba_lines) { |
