数据库
影月风格厂
天文爱好者,通信,医疗影像
github:https://github.com/YuanFang-sz
展开
-
pgsql 将字段的属性int改为bigint
发现pg数据库里面int溢出了,需要扩大一点字段承载力= =ALTER TABLE table_name ALTER COLUMN column_nameTYPE bigint USING (column_name::bigint);原创 2021-11-15 09:08:49 · 2632 阅读 · 0 评论 -
PG数据中查询数据库锁的类型
select pid,relation,mode,relname from pg_locks a,pg_class b where relation in (select oid from pg_class) and a.relation = b.oid以上SQL语句,可查看锁的类型和ID原创 2021-08-19 14:28:58 · 280 阅读 · 0 评论 -
PGsql中判断存储过程是否存在的方法
发现国内大家研究PG数据库的相关东西比较少,本人偶尔搬运一些东西过来,便于大家查询。PGsql中判断存储过程是否存在的方法,如下:SELECTEXISTS(SELECT*FROMpg_catalog.pg_procJOINpg_namespaceONpg_catalog.pg_proc.pronamespace=pg_namespace.oidWHEREproname='proc_name'...原创 2021-02-19 15:35:01 · 1404 阅读 · 0 评论