2013年10月8日
摘要: 使用yum安装完postgresql,没有使用默认的DATA地址,自己配置了DATA地址以后,使用root权限启动serviceservice postgresql start,报出了"FAILED"不解,检查Log文件/var/lib/pgsql/pgstartup.log. 发现如下记录postmaster cannot access the server configuration file"/var/lib/pgsql/data/postgresql.conf": Permission denied于是检查postgres用户的文件权限,没有明显 阅读全文
posted @ 2013-10-08 10:26 BoneKing 阅读(9333) 评论(0) 推荐(0) 编辑
摘要: 转自http://csk83.sinaapp.com/?p=104在实际应用中常常遇见这样的情况,见下表,我们现在需要统计出来每年每个人的工资总和以及发放月份。user_nameyearmonthmoney张三20111900张三201121200张三201151100张三201161300李四201111100李四201131200即我们要得到下面表的结果user_nameyearmonthestotal money张三20111,2,5,64500李四20111,32300首先我们想到的是有这样的SQL语句:SELECT user_name,year,myfunction(month) A 阅读全文
posted @ 2013-10-08 10:03 BoneKing 阅读(7976) 评论(0) 推荐(1) 编辑