4
【数据库】pg库相关操作函数记录
source link: https://holydogs.github.io/2022/12/15/%E3%80%90%E6%95%B0%E6%8D%AE%E5%BA%93%E3%80%91pg%E5%BA%93%E7%9B%B8%E5%85%B3%E6%93%8D%E4%BD%9C%E5%87%BD%E6%95%B0%E8%AE%B0%E5%BD%95/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
2022-12-15
【数据库】pg库相关操作函数记录
CREATE EXTENSION postgis;
CREATE SEQUENCE "public"."seq_feedback_info_id"
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
select nextval('seq_feedback_info_id')
ST_SimplifyPreserveTopology 抽稀
( st_area ( st_transform ( st_setsrid ( shape, 4326 ), 4527 ) ) ) / 1000000 as area 计算面积
st_astext(st_geomfromgeojson(st_asgeojson(shape, 6, 8))) 9.6之前版本pg保留6位小数
CREATE EXTENSION pg_stat_statements;
redis配置的host不生效:
修改host为hostName
mysql执行语句过长,无法执行:
查看最大允许的值
SHOW variables like ‘max_allowed_packet’;
暂时修改(重启后失效,需要去数据库配置里永久修改这个参数)
SET GLOBAL MAX_ALLOWED_PACKET=104857600
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK