anchor.diff:      end.
   
   push(Conn, Depth) ->
  -    case Depth of 0 -> pgsql:squery(Conn, "BEGIN"); _ -> ok end,
  -    pgsql:squery(Conn, "SAVEPOINT savepoint"++integer_to_list(Depth)).
  +    case Depth of 0 -> epgsql:squery(Conn, "BEGIN"); _ -> ok end,
  +    epgsql:squery(Conn, "SAVEPOINT savepoint"++integer_to_list(Depth)).
   
   pop(Conn, Depth) ->
  -    pgsql:squery(Conn, "ROLLBACK TO SAVEPOINT savepoint"++integer_to_list(Depth - 1)).
  +    epgsql:squery(Conn, "ROLLBACK TO SAVEPOINT savepoint"++integer_to_list(Depth - 1)).
   
   dump(_Conn) -> "".
   
   execute(Conn, Commands) ->
  -    pgsql:squery(Conn, Commands).
  +    epgsql:squery(Conn, Commands).
   
   execute(Conn, Commands, Params) ->
  -    pgsql:equery(Conn, Commands, Params).
  +    epgsql:equery(Conn, Commands, Params).
   
   transaction(Conn, TransactionFun) ->
  -    case pgsql:with_transaction(Conn, fun(_C) -> TransactionFun() end) of
  +    case epgsql:with_transaction(Conn, fun(_C) -> TransactionFun() end) of
           {rollback, Reason} -> {aborted, Reason};
           Other -> {atomic, Other}
       end.
   
   get_migrations_table(Conn) ->
  -    Res = pgsql:equery(Conn, "SELECT * FROM schema_migrations", []),
  +    Res = epgsql:equery(Conn, "SELECT * FROM schema_migrations", []),
       case Res of
           {ok, _Columns, ResultRows} ->
               ResultRows;
  
positive.code:             Record1        = maybe_populate_id_value(Record),
              Type        = element(1, Record1),
              {Query,Params}    = build_insert_query(Record1),
          Res            = pgsql:equery(Conn, Query, Params),
              case Res of
                  {ok, _, _, [{Id}]} ->
                      {ok, Record1:set(id, lists:concat([Type, "-", id_value_to_string(Id)]))};
  
negative.code:             end;
          Defined when is_list(Defined) ->
              {Query,Params} = build_update_query(Record),
              Res = epgsql:equery(Conn, Query, Params),
              case Res of
                  {ok, _}         -> {ok, Record};
                  {error, Reason} -> {error, Reason}
  