sehajsandhu123 commented on issue #71977:
URL: https://github.com/apache/airflow/issues/71977#issuecomment-5384799592

   @gbengune 
   I reproduced this and bisected this issue — it's not pandas. The 3.3.1 
Docker image bumped apache-airflow-providers-postgres from 6.8.0 to 7.0.x, 
whose breaking change switches the SQLAlchemy engines built by PostgresHook 
from psycopg2 to psycopg (v3) whenever SQLAlchemy 2.x is installed.
   
   SQLAlchemy's psycopg (v3) dialect renders typed bind casts, so the insert 
becomes:
   
   INSERT INTO t (id, ...) VALUES ($1::VARCHAR, ...)
   
   and PostgreSQL refuses the character varying → uuid assignment (with 
psycopg2, string params are sent untyped and the server coerces them).
   
   I've opened #72000 to fix this: PostgresHook now honors the 
sqlalchemy_scheme connection extra, so setting {"sqlalchemy_scheme": 
"postgresql+psycopg2"} on the connection keeps its SQLAlchemy engines on 
psycopg2 and restores the previous behaviour. The default (psycopg3) is 
unchanged.


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