Jyoti Leeka <leekajyoti(at)gmail(dot)com> writes:
> However, to my surprise I found that although A and B are separated from
> each other by a distance greater than 50 km (50.995 km to be precise. Found
> using Chris Veness's geodesy formulae (
> http://stackoverflow.com/questions/27461634/calculate-distance-between-a-point-and-a-line-segment-in-latitude-and-longitude))
> yet they are returned by postgres as results.
I think you need to ask about that on the Postgis mailing lists, not here.
regards, tom lane