diff options
author | Andres Freund | 2018-03-30 23:33:42 +0000 |
---|---|---|
committer | Andres Freund | 2018-03-31 00:05:16 +0000 |
commit | d87510a524f36a630cfb34cc392e95e959a1b0dc (patch) | |
tree | 0ec7d1d6409add64be63fc71f491c75a33d4df47 /src/backend/commands/sequence.c | |
parent | 9a895462d940c0694042059f90e5f63a0a517ded (diff) |
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
Diffstat (limited to 'src/backend/commands/sequence.c')
-rw-r--r-- | src/backend/commands/sequence.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c index dcc0aa536a0..89122d4ad75 100644 --- a/src/backend/commands/sequence.c +++ b/src/backend/commands/sequence.c @@ -432,8 +432,7 @@ AlterSequence(ParseState *pstate, AlterSeqStmt *stmt) /* Open and lock sequence, and check for ownership along the way. */ relid = RangeVarGetRelidExtended(stmt->sequence, ShareRowExclusiveLock, - stmt->missing_ok, - false, + stmt->missing_ok ? RVR_MISSING_OK : 0, RangeVarCallbackOwnsRelation, NULL); if (relid == InvalidOid) |