mirror of
https://github.com/jbranchaud/til
synced 2026-01-07 09:08:01 +00:00
Add Assumed Radius Of The Earth as a postgres til
This commit is contained in:
18
postgres/assumed-radius-of-the-earch.md
Normal file
18
postgres/assumed-radius-of-the-earch.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# Assumed Radius Of The Earth
|
||||
|
||||
Using the
|
||||
[`earthdistance`](https://www.postgresql.org/docs/8.3/static/earthdistance.html)
|
||||
module, we can get the assumed radius of the earth (in meters).
|
||||
|
||||
```sql
|
||||
> create extension cube;
|
||||
CREATE EXTENSION
|
||||
|
||||
> create extension earthdistance;
|
||||
CREATE EXTENSION
|
||||
|
||||
> select earth();
|
||||
earth
|
||||
---------
|
||||
6378168
|
||||
```
|
||||
Reference in New Issue
Block a user