david-waterworth opened a new issue, #496:
URL: https://github.com/apache/arrow-adbc/issues/496

   Is there a list of what postgres datatypes are/are not supported by the 
python api?
   
   ``` python
   from adbc_driver_postgresql import dbapi
   
   with dbapi.connect(DSN) as conn:
       with conn.cursor() as cur:
           cur.execute("select TO_TIMESTAMP('2020-01-01', 'YYYY-MM-DD')")
           assert cur.fetchone() == (1,)
   ```
   
   results in a NotSupportedError and I cannot see a way of evaluating what 
is/isn't supported in the current release.
   
   ``` console
   ---------------------------------------------------------------------------
   NotSupportedError                         Traceback (most recent call last)
   Cell In[65], line 6
         4 with dbapi.connect(DSN) as conn:
         5     with conn.cursor() as cur:
   ----> 6         cur.execute("select TO_TIMESTAMP('2020-01-01', 
'YYYY-MM-DD')")
         7         assert cur.fetchone() == (1,)
   
   File 
~/dev/warpspeed-timeseries/.venv/lib/python3.10/site-packages/adbc_driver_manager/dbapi.py:574,
 in Cursor.execute(self, operation, parameters)
       559 """
       560 Execute a query.
       561 
      (...)
       571     parameters, which will each be bound in turn).
       572 """
       573 self._prepare_execute(operation, parameters)
   --> 574 handle, self._rowcount = self._stmt.execute_query()
       575 self._results = _RowIterator(
       576     pyarrow.RecordBatchReader._import_from_c(handle.address)
       577 )
   
   File 
~/dev/warpspeed-timeseries/.venv/lib/python3.10/site-packages/adbc_driver_manager/_lib.pyx:899,
 in adbc_driver_manager._lib.AdbcStatement.execute_query()
   
   File 
~/dev/warpspeed-timeseries/.venv/lib/python3.10/site-packages/adbc_driver_manager/_lib.pyx:371,
 in adbc_driver_manager._lib.check_error()
   
   NotSupportedError: ADBC_STATUS_NOT_IMPLEMENTED (2): [libpq] Column #1 
("to_timestamp") has unimplemented type code 1184
   ```


-- 
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