-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for pg8000 as the PostgreSQL driver #3142
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm; i'm going to update with master and let tests run. if all pass, i'll merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only check failure was codecov on patch additions. Not worried about that. Merging!
Description
Added support for the
pg8000
library as the PostgreSQL driver.Motivation and Context
I'm trying to ingest data into a Gooel Cloud SQL instance without having to use
cloud_sql_proxy
and found this library: https://github.com/GoogleCloudPlatform/cloud-sql-python-connector#cloud-sql-connector-for-python-drivers, however that only has support forpg8000
to connect to PostgreSQL.Both
pg8000
anpsycopg2
implement DB API 2.0 (a.k.a. PEP-249) so most of the operation should be supported; I've just made a few changes to make sure we handle exceptions in a cross-library way.Have you tested this? If so, how?
I ran my jobs with these changes and they worked fine.