Wrong distance shown in miles for extension earthdistance
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/10/earthdistance.html Description: Hi, I have installed CREATE EXTENSION CUBE; CREATE EXTENSION earthdistance; Post which I ran the following query: SELECT (POINT (19.974, 72.756)<@> POINT (19.195, 72.959)) AS DISTANCE; The answer came back as 21.17534 miles whereas the actual distance (as crow flies) is 55.42 miles which I have checked from 2-3 websites. (Google maps gives a greater distance which is travel by road & this value has been ignored). I know both the places and the distance between both of them cannot be 22 miles. It has to be in excess of 50 miles atleast. What am I missing?
Re: Wrong distance shown in miles for extension earthdistance
On Mon, Mar 22, 2021 at 9:27 AM PG Doc comments form wrote: > > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/10/earthdistance.html > Description: > > Hi, > I have installed > CREATE EXTENSION CUBE; > CREATE EXTENSION earthdistance; > > Post which I ran the following query: > SELECT (POINT (19.974, 72.756)<@> POINT (19.195, 72.959)) AS DISTANCE; > > The answer came back as 21.17534 miles whereas the actual distance (as crow > flies) is 55.42 miles which I have checked from 2-3 websites. (Google maps > gives a greater distance which is travel by road & this value has been > ignored). > > I know both the places and the distance between both of them cannot be 22 > miles. It has to be in excess of 50 miles atleast. What am I missing? By your queasy it looks like you are comparing two points in the Norwegian Sea. I think you may have swapped your latitude and longitude, and are actually looking for: postgres=# SELECT (POINT (72.756, 19.974)<@> POINT (72.959, 19.195)) AS DISTANCE; distance 55.421996899143366 -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/
ssl connection with certificate
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/11/index.html Description: Good morning. Following the instructions https://www.postgresql.org/docs/11/ssl-tcp.html I can't establish a local connection with certificate. In the pg_hba.conf hostsslall all 127.0.0.1/32md5 clientcert=1 And in the postgresql.conf: ssl_cert_file = '/etc/postgresql/11/main/server.crt' ssl_key_file = '/etc/postgresql/11/main/server.key' server is a certficate is generated. The error all the time is the same, it cannot connect because either the server is not activated or something is missing. I need a possible solution. The installation I have done is the basic sudo apt install postgresql on debian 10 Thanks and best regards,