WillAyd opened a new issue, #1147:
URL: https://github.com/apache/arrow-adbc/issues/1147

   Tested on 0.7.0
   
   ```python
   from adbc_driver_postgresql import dbapi as pg_dbapi
   from adbc_driver_sqlite import dbapi as sqlite_dbapi
   
   
   sqlite_uri = "file::memory"
   with sqlite_dbapi.connect(sqlite_uri) as conn:
       with conn.cursor() as cur:
           cur.execute("SELECT current_date;")  # executes without error
       
   pg_uri = "postgresql://postgres:postgres@localhost:5432/pandas"
   with pg_dbapi.connect(pg_uri) as conn:
       with conn.cursor() as cur:
           cur.execute("SELECT current_date;")        
   ```
   
   The postgres execute call yields
   
   ```sh
   ProgrammingError                          Traceback (most recent call last)
   Cell In[3], line 13
        11 with pg_dbapi.connect(pg_uri) as conn:
        12     with conn.cursor() as cur:
   ---> 13         cur.execute("SELECT current_date;")        
   
   File 
~/mambaforge/envs/pandas-dev/lib/python3.10/site-packages/adbc_driver_manager/dbapi.py:669,
 in Cursor.execute(self, operation, parameters)
       654 """
       655 Execute a query.
       656 
      (...)
       666     parameters, which will each be bound in turn).
       667 """
       668 self._prepare_execute(operation, parameters)
   --> 669 handle, self._rowcount = self._stmt.execute_query()
       670 self._results = _RowIterator(
       671     # pyarrow.RecordBatchReader._import_from_c(handle.address)
       672     _reader.AdbcRecordBatchReader._import_from_c(handle.address)
       673 )
   
   File 
~/mambaforge/envs/pandas-dev/lib/python3.10/site-packages/adbc_driver_manager/_lib.pyx:1106,
 in adbc_driver_manager._lib.AdbcStatement.execute_query()
   
   File 
~/mambaforge/envs/pandas-dev/lib/python3.10/site-packages/adbc_driver_manager/_lib.pyx:227,
 in adbc_driver_manager._lib.check_error()
   
   ProgrammingError: INVALID_ARGUMENT: [libpq] Failed to execute query: could 
not begin COPY: ERROR:  syntax error at or near ";"
   LINE 1: COPY (SELECT current_date;) TO STDOUT (FORMAT binary)
                                    ^
   
   Query was: COPY (SELECT current_date;) TO STDOUT (FORMAT binary). SQLSTATE: 
42601
   ```


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