pgsql中能用to_date表示详细时间么?怎么表示具体时间段

    在Oracle中选择具体时间区间只需将字符用to_date进行转换成时间即可。但是在postgresql中是不是发现没效果咯?!    测试发现pgsql中的to_date真的是将时间转换成日期,而非精确到分秒,如下sql:select * from LOG a  where  a.CREATE_TIME >= to_date('2019-01-08 00:00:00','yyyy-MM-dd HH24:mi:ss') and a.CREATE_TIME <= to_date('2019-01-08 16:30:43','yyyy-MM-dd HH24:mi:ss')这样写虽然具体时间不一样,但是由于转换的是日期因此两实际时间在pgsql中是一样的,这种情况只需要将to_date改成to_timestamp即可,以后注意pgsql中to_date返回的是日期,非具体时间。

Could not set parameters for mapping: ParameterMapping{property='param'错误

mybatis中出现这样错误,Could not set parameters for mapping: ParameterMapping{property='param'问题原来出在xml中,由于#号修饰的变量加了引号所致,问题如下:select  code from sys_code where codename = '#{area}'解决方法也很简单,将引号去掉或者改为$,#{area}自带引号