KNN GiST detects which type it should return by returning type of ordering operator.But it appears that type of sk_func is detected after it was replaced with distance function. That is wrong: distance function should always return float8.I think it is just a typo.
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных