anchor.diff: +%%==============================================================================
  +%% @author Gavin M. Roy <gavinr@aweber.com>
  +%% @copyright 2014 AWeber Communications
  +%% @end
  +%%==============================================================================
  +
  +%% @doc pgsql-listen exchange plugin implementing core exchange behavior
  +%% @end
  +
   -module(pgsql_listen_exchange).
  -
  --include("pgsql_listen.hrl").
  --include_lib("rabbit_common/include/rabbit.hrl").
   
   -behaviour(rabbit_exchange_type).
   
  
positive.code:   case gen_server:call(pgsql_listen, {validate, X}) of
      ok -> ok;
      {error, Reason} ->
        rabbit_log:error("postgresql connection failed: ~s", [Reason]),
        rabbit_misc:protocol_error(resource_error,
                                   "postgresql connection failed: ~s",
                                   [Reason])
    end.
  
  
negative.code: delete(_, _, _) ->
    ok.
  
  policy_changed(OldX, NewX) ->
    Bs = rabbit_binding:list_for_source(OldX),
    case gen_server:call(pgsql_listen, {delete, OldX, Bs}) of
      ok ->
  