摘要: 全量迁移 备份数据 $ pg_dump -h 172.19.235.145 -U <username> -d <database> > 20180704_dbpe.sql 正式迁移 首先要修改备份文件*.sql的owner,防止权限出现错误。 $ psql -h <ip> -U <username> 阅读全文
posted @ 2020-11-23 20:21 山上一边边 阅读(637) 评论(0) 推荐(0) 编辑
摘要: PostgreSQL将日期转为年、月、日的函数date_trunc: 当前年: select date_trunc('year',now()) 当前月: select date_trunc('month',now()) 当前日: select date_trunc('day',now()) 当前时: 阅读全文
posted @ 2020-11-23 08:20 山上一边边 阅读(3732) 评论(0) 推荐(0) 编辑