CLIENT-GETNAME(3valkey)
π CLIENT-GETNAME π
okay so bestie, we're looking at CLIENT-GETNAME(3valkey) from the Valkey Command Manual β it's giving "who am I, really?" but for your connection. let's get into it π«Ά
β¨ NAME β¨
client-getname β returns the name of the connection. that's it, that's the whole job, and she does it flawlessly π
πΈ SYNOPSIS πΈ
CLIENT GETNAME
so like. CLIENT GETNAME returns the name of the current connection, specifically the name that was set by valkey-client-setname(7) CLIENT SETNAME. cute, right?
but here's the tea: every new connection starts with no name attached at all, so if nobody ever assigned one, you get a null bulk reply back. no name, no vibes, just null. π
π¦ REPLY π¦
RESP2
one of these two, bestie:
valkey-protocol(7)Bulk string reply: the connection name of the current connection β¨valkey-protocol(7)Nil reply: the connection name was not set π
RESP3
and in the newer era, one of these two:
valkey-protocol(7)Bulk string reply: the connection name of the current connection β¨valkey-protocol(7)Null reply: the connection name was not set π
(note the glow-up: Nil reply in RESP2 becomes Null reply in RESP3. same energy, different label, iykyk π)
β‘ COMPLEXITY β‘
O(1) β constant time, no cap. she does not care how big your connection list is, she is not scrolling. main character efficiency π
π ACL CATEGORIES π
@connection@slow
π HISTORY π
- Available since:
2.6.9β an icon from way back, been serving looks since 2.6.9 π
π SEE ALSO π
go read these next, they're all part of the same friend group:
auth(3valkey)client(3valkey)client-caching(3valkey)client-capa(3valkey)client-getredir(3valkey)client-help(3valkey)client-id(3valkey)client-import-source(3valkey)client-info(3valkey)client-kill(3valkey)client-list(3valkey)client-no-evict(3valkey)client-no-touch(3valkey)client-pause(3valkey)client-reply(3valkey)client-setinfo(3valkey)client-setname(3valkey)client-tracking(3valkey)client-trackinginfo(3valkey)client-unblock(3valkey)client-unpause(3valkey)echo(3valkey)hello(3valkey)ping(3valkey)quit(3valkey)reset(3valkey)select(3valkey)
and that's the whole page, periodt πβ¨
this lil masterpiece is from Valkey 9.0.0, dated 2025-10-21 β go off, you understood the assignment fr fr ππ¦
π¦ where this page comes from
- fedora 44: valkey-doc 9.0.3-2.fc44 Β· CC-BY-SA-4.0
- fedora 44: valkey-doc 9.0.6-1.fc44 Β· CC-BY-SA-4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms