CLIENT GETNAME
CLIENT GETNAME
- Group
- Connection
- Complexity
- O(1)
- Arity
- 2 (exactly, counting the command name)
- HotKV Cloud
- All plans
- On-Premise
- no license needed
CLIENT GETNAME returns the name set with
CLIENT SETNAME or the SETNAME option of
HELLO.
Return value
Section titled “Return value”| Case | RESP2 | RESP3 |
|---|---|---|
| Name set | Bulk string | Bulk string |
| No name | Nil bulk string | Null |
Examples
Section titled “Examples”127.0.0.1:6379> CLIENT GETNAME(nil)127.0.0.1:6379> CLIENT SETNAME api-1OK127.0.0.1:6379> CLIENT GETNAME"api-1"Compatibility
Section titled “Compatibility”Same as Redis 7 and Valkey 8.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.