Skip to content

Commit 532f4d8

Browse files
committed
Add postgis
1 parent 9fba0e0 commit 532f4d8

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

docs/assets/favicon.svg

Lines changed: 1 addition & 1 deletion
Loading

docs/sql/postgis/index.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
comments: true
3+
tags:
4+
- GIS
5+
---
6+
7+
# PostGIS
8+
9+
## 安装
10+
11+
```sql
12+
CREATE SCHEMA postgis;
13+
GRANT USAGE ON schema postgis to public;
14+
15+
CREATE EXTENSION postgis SCHEMA postgis;
16+
CREATE EXTENSION postgis_raster SCHEMA postgis;
17+
18+
ALTER DATABASE postgis_in_action SET search_path=public,postgis,contrib;
19+
```
20+
21+
!!! info "提示"
22+
虽然不是必需的,但建议在单独的模式(如 postgis)中安装 postgis,这样函数就不会弄乱默认的公共模式。

0 commit comments

Comments
 (0)