diff options
author | Andres Freund <andres@anarazel.de> | 2015-10-03 15:29:08 +0200 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2015-10-03 15:29:35 +0200 |
commit | cfddb5df5a84923160b23890d6086bcbcd1fd655 (patch) | |
tree | 8395a337f44da1582c8c3b2964f56dfd45cffdc8 | |
parent | 7285d66494a4c588ccf743a81f93b85b6995214f (diff) | |
download | postgresql-cfddb5df5a84923160b23890d6086bcbcd1fd655.tar.gz postgresql-cfddb5df5a84923160b23890d6086bcbcd1fd655.zip |
Improve errhint() about replication slot naming restrictions.
The existing hint talked about "may only contain letters", but the
actual requirement is more strict: only lower case letters are allowed.
Reported-By: Rushabh Lathia
Author: Rushabh Lathia
Discussion: AGPqQf2x50qcwbYOBKzb4x75sO_V3g81ZsA8+Ji9iN5t_khFhQ@mail.gmail.com
Backpatch: 9.4-, where replication slots were added
-rw-r--r-- | contrib/test_decoding/expected/ddl.out | 2 | ||||
-rw-r--r-- | src/backend/replication/slot.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/contrib/test_decoding/expected/ddl.out b/contrib/test_decoding/expected/ddl.out index 728798b3b73..a48d42c5a14 100644 --- a/contrib/test_decoding/expected/ddl.out +++ b/contrib/test_decoding/expected/ddl.out @@ -12,7 +12,7 @@ ERROR: replication slot "regression_slot" already exists -- fail because of an invalid name SELECT 'init' FROM pg_create_logical_replication_slot('Invalid Name', 'test_decoding'); ERROR: replication slot name "Invalid Name" contains invalid character -HINT: Replication slot names may only contain letters, numbers, and the underscore character. +HINT: Replication slot names may only contain lower case letters, numbers, and the underscore character. -- fail twice because of an invalid parameter values SELECT 'init' FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', 'frakbar'); ERROR: could not parse value "frakbar" for parameter "include-xids" diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c index abe8747fe4d..41389030b67 100644 --- a/src/backend/replication/slot.c +++ b/src/backend/replication/slot.c @@ -195,7 +195,7 @@ ReplicationSlotValidateName(const char *name, int elevel) (errcode(ERRCODE_INVALID_NAME), errmsg("replication slot name \"%s\" contains invalid character", name), - errhint("Replication slot names may only contain letters, numbers, and the underscore character."))); + errhint("Replication slot names may only contain lower case letters, numbers, and the underscore character."))); return false; } } |