我不能用postgresql在ejabberd上注册用户

每当我尝试添加一个新的用户,如:

ejabberdctl register admin localhost default 

它给了我以下错误:

 Problem 'error undef' occurred executing the command. Stacktrace: [{ejabberd_odbc,escape,["admin"]}, {ejabberd_auth_odbc,is_user_exists,2}, {ejabberd_auth,'-is_user_exists/2-fun-0-',3}, {lists,any,2}, {ejabberd_auth,try_register,3}, {ejabberd_admin,register,3}, {ejabberd_ctl,call_command,3}, {ejabberd_ctl,try_call_command,3}] 

我有erlang与pg库,并在ejabberd上设置以下configuration:

 {auth_method, odbc}. {odbc_server, {pgsql, "localhost", "ejabberd", "root", "admin"}}. 

我还创build了一个名为ejabberd的数据库并迁移了pg.sql文件。 我需要别的东西还是我做错了什么?