Skip to content

Commit b04bd37

Browse files
chore: add comment to cloudsql unix socket sample (GoogleCloudPlatform#7219)
* chore: add comment to unix socket sample
1 parent 6901662 commit b04bd37

File tree

1 file changed

+2
-0
lines changed
  • cloud-sql/postgres/sqlalchemy

1 file changed

+2
-0
lines changed

cloud-sql/postgres/sqlalchemy/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ def init_unix_connection_engine(db_config):
164164
# Equivalent URL:
165165
# postgresql+pg8000://:@/
166166
# ?unix_sock=//.s.PGSQL.5432
167+
# Note: Some drivers require the `unix_sock` query parameter to use a different key.
168+
# For example, 'psycopg2' uses the path set to `host` in order to connect successfully.
167169
sqlalchemy.engine.url.URL.create(
168170
drivername="postgresql+pg8000",
169171
username=db_user, # e.g. "my-database-user"

0 commit comments

Comments
 (0)