摘要:
全量迁移 备份数据 $ pg_dump -h 172.19.235.145 -U <username> -d <database> > 20180704_dbpe.sql 正式迁移 首先要修改备份文件*.sql的owner,防止权限出现错误。 $ psql -h <ip> -U <username> 阅读全文
摘要:
PostgreSQL将日期转为年、月、日的函数date_trunc: 当前年: select date_trunc('year',now()) 当前月: select date_trunc('month',now()) 当前日: select date_trunc('day',now()) 当前时: 阅读全文