gruuya commented on issue #5280:
URL: https://github.com/apache/arrow-rs/issues/5280#issuecomment-1878209251

   > It seems that pgsql ignores the time part.
   
   That is correct, it just throws it away.
   
   In fact it seems it tries to parse it as a timestamp first, and if it fails 
it errors out.
   
   ```rust
   postgres=# SELECT '1998-01-30 01-02-03'::date;
   ERROR:  invalid input syntax for type date: "1998-01-30 01-02-03"
   LINE 1: SELECT '1998-01-30 01-02-03'::date;
                  ^
   
   postgres=# SELECT '1998-01-30 01-02-03'::timestamp;
   ERROR:  invalid input syntax for type timestamp: "1998-01-30 01-02-03"
   LINE 1: SELECT '1998-01-30 01-02-03'::timestamp;
                  ^
   
   postgres=# SELECT '1998-01-30 01:2'::date;
       date    
   ------------
    1998-01-30
   (1 row)
   
   postgres=# SELECT '1998-01-30 01:2'::timestamp;
         timestamp      
   ---------------------
    1998-01-30 01:02:00
   (1 row)
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to