Mnesia transform_table with multiple disc_copies nodes

Fredrik Thulin <>
Wed Dec 21 16:10:50 CET 2005


Hi

How do I make use of mnesia:transform_table/3 when I have more than one 
node with disc_copies of a table?

-module(t).

-export([do/1]).

do(Table) ->
    Attrs = mnesia:table_info(Table, attributes),
    io:format("Attributes of table ~p : ~p~n", [Table, Attrs]),
    F = fun(X) ->
                X
        end,
    mnesia:transform_table(Table, F, Attrs).


()6> t:do(regexproute).
Attributes of table regexproute : [regexp,flags,class,expire,address]
{aborted,{"Bad transform function",
          regexproute,
          #Fun<t.0.76598778>,
          '',
          {undef,[{#Fun<t.0.76598778>,
...

My fun F is (of course) unknown on the other node  
''.

Thanks in advance and a merry christmas to you all

/Fredrik



More information about the erlang-questions mailing list