[erlang-questions] ets:select_delete problem

Magnus Klaar <>
Sat Nov 12 02:07:18 CET 2011


Hi!

There is nothing wrong with your match specifications, would it be possible
to provide information
on how and with which options the table was created? A table is protected
by default which means
that no process other than the one which created table can update the
table. Queries like ets:select
and ets:select_count are permitted.

/ Magnus

On Sat, Nov 12, 2011 at 12:56 AM, Mike Oxford <> wrote:

> ets:select_delete() does not work for me.
>
> The match spec works in ets:select() and ets:select_count().
>
> It IS coded to return the atom true as required.
>
> ets:select(json_in_stats, [{{'$1','$2'},[],['$$']}]).
> [[63488274842,1]]
>
> ets:select(json_in_stats, [{{'$1','$2'},[],[true]}]).
> [true]
>
> ets:select_count(json_in_stats, [{{'$1','$2'},[],[true]}]).
> 1
>
> ets:select_delete(json_in_stats, [{{'$1','$2'},[],[true]}]).
> ** exception error: bad argument
>     in function  ets:select_delete/2
>        called as ets:select_delete(json_in_stats,[{{'$1','$2'},[],[true]}])
>
> What am I doing wrong?
>
> -mox
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111112/9042377e/attachment.html>


More information about the erlang-questions mailing list