1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +03:00

Combine options for RangeVarGetRelidExtended() into a flags argument.

A followup patch will add a SKIP_LOCKED option. To avoid introducing
evermore arguments, breaking existing callers each time, introduce a
flags argument. This'll no doubt break a few external users...

Also change the MISSING_OK behaviour so a DEBUG1 debug message is
emitted when a relation is not found.

Author: Nathan Bossart
Reviewed-By: Michael Paquier and Andres Freund
Discussion: https://postgr.es/m/20180306005349.b65whmvj7z6hbe2y@alap3.anarazel.de
This commit is contained in:
Andres Freund
2018-03-30 16:33:42 -07:00
parent 9a895462d9
commit d87510a524
12 changed files with 45 additions and 32 deletions

View File

@ -743,7 +743,7 @@ CreatePolicy(CreatePolicyStmt *stmt)
/* Get id of table. Also handles permissions checks. */
table_id = RangeVarGetRelidExtended(stmt->table, AccessExclusiveLock,
false, false,
0,
RangeVarCallbackForPolicy,
(void *) stmt);
@ -915,7 +915,7 @@ AlterPolicy(AlterPolicyStmt *stmt)
/* Get id of table. Also handles permissions checks. */
table_id = RangeVarGetRelidExtended(stmt->table, AccessExclusiveLock,
false, false,
0,
RangeVarCallbackForPolicy,
(void *) stmt);
@ -1215,7 +1215,7 @@ rename_policy(RenameStmt *stmt)
/* Get id of table. Also handles permissions checks. */
table_id = RangeVarGetRelidExtended(stmt->relation, AccessExclusiveLock,
false, false,
0,
RangeVarCallbackForPolicy,
(void *) stmt);