PostgreSQL

创建日期:2024-06-21
更新日期:2025-01-07

官网:https://www.postgresql.org/

下载地址:https://www.enterprisedb.com/downloads/postgres-postgresql-downloads

PostGIS下载地址:https://download.osgeo.org/postgis/windows/

使用教程

麒麟v10 arm架构安装PostgreSQL

常用查询

1、查询所有扩展。

SELECT * FROM pg_available_extensions;

2、查询版本。

select version();

常见问题

1、使用DBeaver连接PostgreSQL报错:FATAL: no pg_hba.conf entry for host "192.168.23.51", user "postgres", database "postgres", no encryption。

编辑文件 D:\PostgreSQL\16\data\pg_hba.conf,如下修改,重启postgresql服务即可。

# IPv4 local connections:
host    all             all             127.0.0.1/32            scram-sha-256
host    all             postgres        192.168.23.51/32        md5

2、ERROR: required extension "fuzzystrmatch" is not installed. HINT: Use CREATE EXTENSION... CASCADE to install required extensions too.

创建postgis扩展前,创建fuzzystrmatch扩展。