CLIENT-GETNAME(3valkey)

πŸ“¦
version 9.0.6 Β· 2 versions
, in fedora 44

πŸ’– 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:

RESP3

and in the newer era, one of these two:

(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:


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