CLIENT SETINFO
CLIENT SETINFO LIB-NAME libname CLIENT SETINFO LIB-VER libver
- Group
- Connection
- Complexity
- O(1)
- Arity
- 4 (exactly, counting the command name)
- HotKV Cloud
- All plans
- On-Premise
- no license needed
CLIENT SETINFO stores the client library’s name or version on the
connection. Client libraries send it right after connecting, and the values
show as lib-name= and lib-ver= in CLIENT LIST
and CLIENT INFO, which helps you find connections
from outdated libraries. You normally don’t send it yourself.
Options
Section titled “Options”| Attribute | Value |
|---|---|
LIB-NAME |
The library name, for example redis-py. |
LIB-VER |
The library version, for example 5.0.1. |
The attribute name is case-insensitive. The value follows the same rule as a connection name: no spaces, newlines or other non-printable characters.
Return value
Section titled “Return value”| Case | Reply (RESP2 and RESP3) |
|---|---|
| Stored | Simple string OK |
| Unknown attribute | Error ERR Unrecognized option '<attribute>' |
| Value with a space or special character | Error ERR <attribute> cannot contain spaces, newlines or special characters. |
Examples
Section titled “Examples”127.0.0.1:6379> CLIENT SETINFO LIB-NAME my-clientOK127.0.0.1:6379> CLIENT SETINFO LIB-VER 1.4.2OK127.0.0.1:6379> CLIENT SETINFO LIB-COLOR blue(error) ERR Unrecognized option 'LIB-COLOR'Compatibility
Section titled “Compatibility”Same attributes as Redis 7.2 and later, and Valkey 8.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.