mullimanko commented on issue #2177:
URL: https://github.com/apache/arrow-adbc/issues/2177#issuecomment-2956733221

   > I think you are looking for something like this:
   > 
   > tbl = pa.Table(...)
   > with adbc_driver_postgresql.dbapi(conn_args) as conn, conn.cursor() as cur:
   >     cur.adbc_prepare("INSERT INTO some_table VALUES (?)")
   >     cur.executemany("INSERT INTO some_table VALUES (?)", tbl)
   >     conn.commit()
   
   Should the `?` in the code be replaced by `$1, $2, $3, $4` and so on for 
each column one number? I could not get this to work with the `?`. Following 
the postgresql docs (https://www.postgresql.org/docs/current/sql-prepare.html), 
it seems that in the first line `cur.adbc_prepare("INSERT INTO some_table 
VALUES (?)")`, the `?` can or maybe should be replaced with the data types of 
the columns, if `adbc_prepare` returns `None`. Is this true?


-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to