diff options
author | Tomas Vondra | 2017-01-19 13:08:37 +0000 |
---|---|---|
committer | Tomas Vondra | 2017-01-19 13:08:37 +0000 |
commit | a6f65ca099b76b41aaab7849d4557ecee6934d8c (patch) | |
tree | 21d3dacff01d6b08bdee1ae63c1d20bcffc4cc1b | |
parent | c835a7b111c333f55e20ed1b71aa6b7a80256a5f (diff) |
use text argument instead of cstring in pg_msgmodule_set()
opr_sanity checks that functions with cstring arguments are either
type input or conversion functions. Tweaking the function to accept
text seems like a better idea than relaxing opr_sanity tests.
-rw-r--r-- | src/backend/utils/error/elog.c | 2 | ||||
-rw-r--r-- | src/include/catalog/pg_proc.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c index c4e366192d..2da98efa33 100644 --- a/src/backend/utils/error/elog.c +++ b/src/backend/utils/error/elog.c @@ -4077,7 +4077,7 @@ pg_msgmodule_set(PG_FUNCTION_ARGS) int32 moduleid = PG_GETARG_INT32(0); int32 fileid = PG_GETARG_INT32(1); int32 msgid = PG_GETARG_INT32(2); - const char *levelstr = PG_GETARG_CSTRING(3); + const char *levelstr = text_to_cstring(PG_GETARG_TEXT_PP(3)); int32 level; if (!superuser()) diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h index 8a6f047d8d..7fccccf2a4 100644 --- a/src/include/catalog/pg_proc.h +++ b/src/include/catalog/pg_proc.h @@ -5320,7 +5320,7 @@ DATA(insert OID = 6014 ( pg_show_replication_origin_status PGNSP PGUID 12 1 100 DESCR("get progress for all replication origins"); #ifdef USE_MODULE_MSGIDS -DATA(insert OID = 6015 ( pg_msgmodule_set PGNSP PGUID 12 1 1 0 0 f f f f t t i s 4 0 16 "20 20 20 2275" _null_ _null_ _null_ _null_ _null_ pg_msgmodule_set _null_ _null_ _null_ )); +DATA(insert OID = 6015 ( pg_msgmodule_set PGNSP PGUID 12 1 1 0 0 f f f f t t i s 4 0 16 "20 20 20 25" _null_ _null_ _null_ _null_ _null_ pg_msgmodule_set _null_ _null_ _null_ )); DESCR("set debugging level for module/file/msg"); DATA(insert OID = 6016 ( pg_msgmodule_change PGNSP PGUID 12 1 1 0 0 f f f f t t i s 4 0 16 "20 20 20 20" _null_ _null_ _null_ _null_ _null_ pg_msgmodule_change _null_ _null_ _null_ )); DESCR("change debugging level for module/file/msg"); |