diff options
author | Wen Hui <wen.hui.ware@gmail.com> | 2022-08-02 21:19:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-02 18:19:53 -0700 |
commit | beb9746a9f5f3df198c1b655b7f024b610d9371c (patch) | |
tree | 29836db2f54b90791b06f760eb7099a106df1b47 /src/functions.c | |
parent | 4fe9242a7ff470439879072cd25e851d1636c214 (diff) | |
download | redis-beb9746a9f5f3df198c1b655b7f024b610d9371c.tar.gz |
Fix function load error message (#10964)
Update error messages for function load
Diffstat (limited to 'src/functions.c')
-rw-r--r-- | src/functions.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/functions.c b/src/functions.c index 688d9f5c6..1e81bf6bc 100644 --- a/src/functions.c +++ b/src/functions.c @@ -245,7 +245,7 @@ functionsLibCtx* functionsLibCtxCreate() { */ int functionLibCreateFunction(sds name, void *function, functionLibInfo *li, sds desc, uint64_t f_flags, sds *err) { if (functionsVerifyName(name) != C_OK) { - *err = sdsnew("Function names can only contain letters and numbers and must be at least one character long"); + *err = sdsnew("Library names can only contain letters, numbers, or underscores(_) and must be at least one character long"); return C_ERR; } @@ -819,7 +819,7 @@ void functionFlushCommand(client *c) { /* FUNCTION HELP */ void functionHelpCommand(client *c) { const char *help[] = { -"LOAD <ENGINE NAME> <LIBRARY NAME> [REPLACE] [DESCRIPTION <LIBRARY DESCRIPTION>] <LIBRARY CODE>", +"LOAD [REPLACE] <FUNCTION CODE>", " Create a new library with the given library name and code.", "DELETE <LIBRARY NAME>", " Delete the given library.", @@ -847,7 +847,7 @@ void functionHelpCommand(client *c) { " * ASYNC: Asynchronously flush the libraries.", " * SYNC: Synchronously flush the libraries.", "DUMP", -" Returns a serialized payload representing the current libraries, can be restored using FUNCTION RESTORE command", +" Return a serialized payload representing the current libraries, can be restored using FUNCTION RESTORE command", "RESTORE <PAYLOAD> [FLUSH|APPEND|REPLACE]", " Restore the libraries represented by the given payload, it is possible to give a restore policy to", " control how to handle existing libraries (default APPEND):", @@ -961,7 +961,7 @@ sds functionsCreateWithLibraryCtx(sds code, int replace, sds* err, functionsLibC } if (functionsVerifyName(md.name)) { - *err = sdsnew("Library names can only contain letters and numbers and must be at least one character long"); + *err = sdsnew("Library names can only contain letters, numbers, or underscores(_) and must be at least one character long"); goto error; } |