diff options
author | Alexander Korotkov <akorotkov@postgresql.org> | 2021-04-23 12:57:33 +0300 |
---|---|---|
committer | Alexander Korotkov <akorotkov@postgresql.org> | 2021-04-23 13:25:45 +0300 |
commit | 6bbcff096f932a1fe43ac3208c5c8b0acac29cda (patch) | |
tree | f73800aea68771aa4cdfa7b19163146906744d1e /src/backend/commands/typecmds.c | |
parent | 3f20d5f37086e548c32ddb9d6ae09c2e1ce300ce (diff) | |
download | postgresql-6bbcff096f932a1fe43ac3208c5c8b0acac29cda.tar.gz postgresql-6bbcff096f932a1fe43ac3208c5c8b0acac29cda.zip |
Mark multirange_constructor0() and multirange_constructor2() strict
These functions shouldn't receive null arguments: multirange_constructor0()
doesn't have any arguments while multirange_constructor2() has a single array
argument, which is never null.
But mark them strict anyway for the sake of uniformity.
Also, make checks for null arguments use elog() instead of ereport() as these
errors should normally be never thrown. And adjust corresponding comments.
Catversion is bumped.
Reported-by: Peter Eisentraut
Discussion: https://postgr.es/m/0f783a96-8d67-9e71-996b-f34a7352eeef%40enterprisedb.com
Diffstat (limited to 'src/backend/commands/typecmds.c')
-rw-r--r-- | src/backend/commands/typecmds.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c index e975508ffa2..036fa69d17d 100644 --- a/src/backend/commands/typecmds.c +++ b/src/backend/commands/typecmds.c @@ -1844,7 +1844,7 @@ makeMultirangeConstructors(const char *name, Oid namespace, PROKIND_FUNCTION, false, /* security_definer */ false, /* leakproof */ - false, /* isStrict */ + true, /* isStrict */ PROVOLATILE_IMMUTABLE, /* volatility */ PROPARALLEL_SAFE, /* parallel safety */ argtypes, /* parameterTypes */ @@ -1929,7 +1929,7 @@ makeMultirangeConstructors(const char *name, Oid namespace, PROKIND_FUNCTION, false, /* security_definer */ false, /* leakproof */ - false, /* isStrict */ + true, /* isStrict */ PROVOLATILE_IMMUTABLE, /* volatility */ PROPARALLEL_SAFE, /* parallel safety */ argtypes, /* parameterTypes */ |