SHARE
TWEET

Untitled

a guest Jan 12th, 2017 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ERROR:  input is out of range
  2. CONTEXT:  SQL function "gc_dist1" statement 1
  3.    
  4. create or replace function gc_dist1(_lat1 float8, _lon1 float8, _lat2 float8, _lon2 float8)
  5. returns float8 as $$
  6. select ACOS(SIN(radians($1))*SIN(radians($3))+COS(radians($1))*COS(radians($3))*COS(radians($4)-radians($2)))*6371;
  7. $$ language sql immutable;
  8.  
  9. select gc_dist1(24.6269989013672,59.3357849157094,24.6269989013672,59.3357849121094);
RAW Paste Data
Top