google-code-export / redis

Automatically exported from code.google.com/p/redis
BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

HDEL command does not take more than one field #600

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What version of Redis you are using, in what kind of Operating System?
2.2.11 on Linux OpenSUSE 11.4

What is the problem you are experiencing?
HDEL failed with more than one field is specified

What steps will reproduce the problem?
redis 127.0.0.1:6379[1]> hset myhash field1 "value1"
(integer) 1
redis 127.0.0.1:6379[1]> hset myhash field2 "value2"
(integer) 1
redis 127.0.0.1:6379[1]> hdel myhash field1 field2
(error) ERR wrong number of arguments for 'hdel' command
redis 127.0.0.1:6379[1]> 

Do you have an INFO output? Please past it here.

If it is a crash, can you please paste the stack trace that you can find in
the log file or on standard output? This is really useful for us!

Please provide any additional information below.

Original issue reported on code.google.com by jeff.k...@gmail.com on 30 Jun 2011 at 6:06

GoogleCodeExporter commented 9 years ago
Forgot to mention that the command page shows it is supported:

HDEL key field [field ...]

Original comment by jeff.k...@gmail.com on 30 Jun 2011 at 6:08

GoogleCodeExporter commented 9 years ago
That page also mentions:
"For Redis versions 2.2 and below, this command is only available as a 
non-variadic variant. To remove multiple fields from a hash in an atomic 
fashion for those versions, use a MULTI/EXEC block."

We like to keep the docs up to date with the latest available features instead 
of having separate docs per version (since that is a big maintenance pain). 
Instead, we like to simply mention the history of a command on the same page to 
make sure there is as little confusion as possible.

Cheers,
Pieter

Original comment by pcnoordh...@gmail.com on 30 Jun 2011 at 9:56

GoogleCodeExporter commented 9 years ago
Thanks for the response.  I did not realize that extra disclaimer actually 
includes the latest and greatest redis version (I thought it was 2.2.0).  Since 
there is no official 2.3.x, I think it seems odd to show that confusing extra 
fields on the command help page.  :)

Original comment by jeff.k...@gmail.com on 1 Jul 2011 at 12:02