1.Linux下查看是否开启
lsof -i:5432
2.可以用postgresql自带psql程序,导入sql语句
psql -U username -W -d dbname -f xx.sql
3.psql远程登录命令
psql -h xxxxx -U dbuser -p port -d dbname.
4替换为空字符查询(oracle为ORACLE 有NVL函数)
CASE WHEN D.wk_ptn_cd IS NULL THEN '00' ELSE D.wk_ptn_cd END AS wk_ptn_cd
select COALESCE(D.wk_ptn_cd, '00') as wk_ptn_cd