PostgreSQL中date数据类型

PostgreSQL中date数据类型
highgo=# create table test_aa (c1 date);CREATE TABLEhighgo=# insert into test_aa values (to_date('2018-06-05 19:55:44' ,'yyyy-mm-dd hh24:mi:ss'));INSERT 0 1highgo=# insert into test_aa values (to_date('2018-06-05 03:55:44' ,'yyyy-mm-dd hh24:mi:ss'));INSERT 0 1highgo=# insert into test_aa values (to_date('2018-06-06 13:55:44' ,'yyyy-mm-dd hh24:mi:ss'));INSERT 0 1highgo=# select * from test_aa;     c1     ------------ 2018-06-05 2018-06-05 2018-06-06(3 rows)highgo=#
结论: pg中的date数据类型是指年-月-日,不包括时-分-秒 oracle中的date数据类型是指"年-月-日 时-分-秒"

推荐阅读