Why earthdistance  operator returns different value than earth_distance function?
They do different things,


earth_distance Returns the great circle distance between two points on the surface of the Earth.
&lt;@&gt; Gives the distance in statute miles between two points on the Earth's surface.


So this is the difference between the average of the two (assuming neither is correct) is given as,

SELECT ((d2-d1) / ((d2+d1)/2)) * 100 AS distance_diff FROM results;
   distance_diff   
-------------------
 0.112652419817465
(1 row)


Which is 0.11%. Per the Great-circle distance on wikipedia


  The Earth is nearly spherical (see Earth radius) so great-circle distance formulas give the distance between points on the surface of the Earth (as the crow flies) correct to within 0.5% or so.


So which one is more accurate? &lt;@&gt;, clearly. But, we can do better as the docs say,


  In this module, the Earth is assumed to be perfectly spherical. (If that's too inaccurate for you, you might want to look at the PostGIS project.)


SELECT ST_Distance(
  ST_MakePoint(1,1)::geography,
  ST_MakePoint(2,2)::geography
);
   st_distance   
-----------------
 156876.14940189
(1 row)


But if your coordinators are SRID 4326, the correct-most distance is 156876.14940189.