postgresql数据库sql使用行转列方法crosstab,添加扩展项,解决ERROR: could not open extension control file “/usr/local/pgs
进入postgresql安装目录,找到contrib文件夹,找到扩展项。安装完成可以在扩展中看到。
·
1. 用超级管理员运行命令
create extension tablefunc;
2. 如果报错,说明未安装扩展
进入postgresql安装目录,找到contrib文件夹,找到扩展项
cd /postgres/postgresql-13.5/contrib/tablefunc
make install
安装完成可以在扩展中看到
cd /postgres/pgsql/share/extension
[postgres@name extension]$ find tablefunc*
tablefunc--1.0.sql
tablefunc.control
tablefunc--unpackaged--1.0.sql
3. 行转列函数使用
更多推荐




所有评论(0)