I wrote:
> So I'm thinking somebody fat-fingered the corner case
> where the perpendicular would have infinite slope, and it is falling
> through to the "take the nearer endpoint" case when it shouldn't.
Actually it's more basic than that: the line_construct_pm() function
is just completely bogus for the case of infinite slope. Will fix.
regards, tom lane