![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Description: user function call unexpected "input out of range" |
#3
| |||
| |||
|
|
This surfaced when calculating the distances between zip codes using latidtudes and longitudes. When the latitudes and longitudes are the same the distance should be zero. Number 1 gives the error. Number 2 differs by a digit in the last decimal place and works. Number 3 is another test with identical latitudes and longitudes and does calculate zero. |
#4
| |||
| |||
|
|
=20 The following bug has been logged online: =20 Bug reference: 2037 Logged by: Tom Email address: lackey (AT) ltu (DOT) edu PostgreSQL version: 8.1-beta4 Operating system: Windows XP Description: user function call unexpected "input out of range" Details:=20 |
#5
| |||
| |||
|
|
--Calculate distance select acos ( sin($1*pi()/180)*sin($3*pi()/180) + cos($1*pi()/180)*cos($3*pi()/180) *cos(($2-$4)*pi()/180) )*60*1.1515*180/pi(); |
![]() |
| Thread Tools | |
| Display Modes | |
| |