anchor.diff:                                 end,
                                  ok = pgsql:sync(C)
                          end,
  -              lists:foreach(Insert, [null | Values])
  -      end).
  -
  -compare(_Type, null, null) -> true;
  -compare(float4, V1, V2)    -> abs(V2 - V1) < 0.000001;
  -compare(float8, V1, V2)    -> abs(V2 - V1) < 0.000000000000001;
  +              lists:foreach(Insert, [undefined | Values])
  +      end).
  +
  +compare(_Type, undefined, undefined) -> true;
  +compare(float4, V1, V2)    -> abs(V1 - V2) < 0.000001;
  +compare(float8, V1, V2)    -> abs(V1 - V2) < 0.000000000000001;
   compare(_Type, V1, V2)     -> V1 =:= V2.
   
   %% flush mailbox
  
positive.code:     check_type(bytea, "E'\001\002'", <<1,2>>, [<<>>, <<0,128,255>>]),
      check_type(text, "'hi'", <<"hi">>, [<<"">>, <<"hi">>]),
      check_type(varchar, "'hi'", <<"hi">>, [<<"">>, <<"hi">>]),
      check_type(date, "'2008-01-02'", {2008,1,2}, [{-4712,1,1}, {5874897,1,1}]),
      check_type(time, "'00:01:02'", {0,1,2.0}, [{0,0,0.0}, {24,0,0.0}]),
      check_type(timetz, "'00:01:02-01'", {{0,1,2.0},1*60*60}, [{{0,0,0.0},0}, {{24,0,0.0},-13*60*60}]),
      check_type(timestamp, "'2008-01-02 03:04:05'", {{2008,1,2},{3,4,5.0}},
                 [{{-4712,1,1},{0,0,0.0}}, {{5874897,12,31}, {23,59,59.0}}]),
      check_type(interval, "'1 hour 2 minutes 3.1 seconds'", {{1,2,3.1},0,0},
                 [{{0,0,0.0},0,-178000000 * 12}, {{0,0,0.0},0,178000000 * 12}]).
  
  text_format_test() ->
      with_connection(
  
negative.code: 
  type_test() ->
      check_type(bool, "true", true, [true, false]),
      check_type(bpchar, "'A'", $A, [1, $1, $Z], "c_char"),
      check_type(int2, "1", 1, [0, 256, -32768, +32767]),
      check_type(int4, "1", 1, [0, 512, -2147483648, +2147483647]),
      check_type(int8, "1", 1, [0, 1024, -9223372036854775808, +9223372036854775807]),
  