SQL> SET datestyle='redwood, show_time';
SQL> show datestyle;
+--------------------+
| DateStyle |
+--------------------+
| Redwood, SHOW_TIME |
+--------------------+
SQL> select '01/02/1999'::timestamp, '1999-01-02'::timestamp, current_timestamp;
+--------------------+--------------------+----------------------------------+
| timestamp | timestamp | current_timestamp |
+--------------------+--------------------+----------------------------------+
| 01-FEB-99 00:00:00 | 02-JAN-99 00:00:00 | 05-DEC-17 11:31:07.530368 +09:00 |
+--------------------+--------------------+----------------------------------+
(1 row)
SQL> SET datestyle='iso,mdy';
SQL> show datestyle;
+-----------+
| DateStyle |
+-----------+
| ISO, MDY |
+-----------+
SQL> select '01/02/1999'::timestamp, '1999-01-02'::timestamp, current_timestamp;
+---------------------+---------------------+-------------------------------+
| timestamp | timestamp | current_timestamp |
+---------------------+---------------------+-------------------------------+
| 1999-01-02 00:00:00 | 1999-01-02 00:00:00 | 2017-12-05 11:31:26.760432+09 |
+---------------------+---------------------+-------------------------------+
(1 row)
SQL> SET datestyle='iso, dmy';
SQL> show datestyle;
+-----------+
| DateStyle |
+-----------+
| ISO, DMY |
+-----------+
SQL> select '01/02/1999'::timestamp, '1999-01-02'::timestamp, current_timestamp;
+---------------------+---------------------+-------------------------------+
| timestamp | timestamp | current_timestamp |
+---------------------+---------------------+-------------------------------+
| 1999-02-01 00:00:00 | 1999-01-02 00:00:00 | 2017-12-05 11:31:51.935354+09 |
+---------------------+---------------------+-------------------------------+
(1 row)
edb 의 datestyle 의 디폴트 세팅값은 Redwood, SHOW_TIME 입니다.
필자는 'ISO, MDY' 값으로 변경해서 운영합니다.