-
PostgreSQL 设置并发连接数
查看当前连接数 select count(*) from pg_stat_activity; 整个 PostgreSQL 服务层面 整个服务器连接数的限制,主要
2023-10-29, Views: 5397 , Topics: PostgreSQL
-
PostgreSQL 更改用户名、密码、管理员权限
说明 CREATE USER等同于CREATE ROLE。 ALTER USER等同于ALTER ROLE。 CREATE USER is now an al
2023-10-28, Views: 6904 , Topics: PostgreSQL
-
PostgreSQL hba 文件的作用
作用 hba:host based authentication基于主机的认证。 说明 修改了hba文件后,需要重启服务或者reload配置。 select pg_reload_conf(); 查
2023-10-27, Views: 2033 , Topics: PostgreSQL
-
PostgreSQL PSQLException: ERROR: value too long for type character varying(255)
错误信息 Cause: org.postgresql.util.PSQLException: ERROR: value too long for type ch
2023-10-26, Views: 4403 , Topics: PostgreSQL
-
PostgreSQL PSQLException: ERROR: syntax error at or near "user"
错误原因 使用PostgreSQL创建表时,使用了user关键字。 解决方法 方法一 使用双引号包裹,即:"user"。 Hibernate可以设置属性自动添加
2023-10-25, Views: 3099 , Topics: PostgreSQL
-
PostgreSQL 修改 shared_preload_libraries 共享预加载依赖库
说明 数据库启动时才会加载shared_preload_libraries参数,修改后必须重启数据库。 找不到指定依赖库,数据库无法启动成功。 查看共享库 sh
2023-10-24, Views: 4167 , Topics: PostgreSQL
-
PostgreSQL 修改系统配置
查看数据库配置文件 show config_file; 输出 postgres=# show config_file;
2023-10-23, Views: 1997 , Topics: PostgreSQL
-
PostgreSQL ALTER SYSTEM 修改系统配置
说明 ALTER SYSTEM会写入到postgresql.auto.conf配置文件中,可通过ALTER SYSTEM RESET ALL初始化所有动态修改的
2023-10-22, Views: 2489 , Topics: PostgreSQL
-
PostgreSQL 查看数据库配置信息
pg_config 与psql一样,pg_config直接在不连接数据库的情况下,命令行中直接查看。 pg_config 输出 ❯ pg_config BIND
2023-10-20, Views: 2726 , Topics: PostgreSQL
-
macOS Postgres.app 配置命令行工具
执行命令 执行完成后需重新打开终端。 sudo mkdir -p /etc/paths.d && echo /Applications/Post
2023-05-22, Views: 3431 , Topics: macOS PostgreSQL
-
Docker 部署 PostgreSQL
搜索镜像 docker search postgres 拉取镜像 版本号可以去官网查看:https://hub.docker.com/_/postgres do
2022-02-06, Views: 3507 , Topics: Docker PostgreSQL DevOps
-
PostgreSQL 重置序列序号
从 1 开始 false表示,数字1还没有被用掉。 select setval('post_id_seq', 1, false); 从 2 开始 true表示,
2021-05-18, Views: 4032 , Topics: PostgreSQL
-
PostgreSQL 修改字段属性
重命名 alter table record_page_view rename ua to user_agent; 添加字段 alter table reco
2021-05-17, Views: 5823 , Topics: PostgreSQL
-
PostgreSQL 时间戳转毫秒值并去除小数位
时间戳转毫秒值 使用extract函数及epoch from关键词。 select extract(epoch from (current_timestamp)
2021-05-16, Views: 9479 , Topics: PostgreSQL
-
Linux 编译安装 PostgreSQL 12.2
下载地址 清华大学镜像,下载并解压。 wget https://mirrors.tuna.tsinghua.edu.cn/postgresql/source/v
2021-05-15, Views: 3834 , Topics: PostgreSQL Linux
-
PostgreSQL distinct 和 distinct on 区别
数据 city空值的为null z-blog=# select city, id, ip from ip_pool; city | id |
2021-01-05, Views: 3690 , Topics: PostgreSQL
-
PostgreSQL update from 根据 A 表更新 B 表
准备工作 -- 创建表1 create table t1(id integer, name text); -- 创建表2 create table t2(id
2021-01-04, Views: 6417 , Topics: PostgreSQL
-
PostgreSQL 查询表中的自增序列名称
SQL 使用pg_get_serial_sequence函数,第一个参数为需要查询的表,第二个参数为自增的列。 select pg_get_serial_seq
2020-12-31, Views: 9091 , Topics: PostgreSQL
-
PostgreSQL 查看时区
查看当前时区 show timezone; 或者 show time zone; 查看内置时区 所有时区 select * from pg_timezone_names; +8时区 selec
2020-12-30, Views: 14698 , Topics: PostgreSQL 时区
-
PostgreSQL 错误: 编码 "UTF8" 的字符 0x0xc9 0x99 在编码 "GBK" 没有相对应值
问题描述 在Windows的PowerShell中使用psql查询记录时抛出如下异常。 错误: 编码"UTF8"的字符0x0xc9 0x99在编码"GBK"没有相对应值 错误原因 UTF8编码的
2020-12-17, Views: 11032 , Topics: PostgreSQL PowerShell CLI