Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b04bd37

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

File tree

Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed
Filter options
  • cloud-sql/postgres/sqlalchemy
Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed

‎cloud-sql/postgres/sqlalchemy/main.py

Copy file name to clipboardExpand all lines: cloud-sql/postgres/sqlalchemy/main.py
+2Lines 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://<db_user>:<db_pass>@/<db_name>
166166
# ?unix_sock=<socket_path>/<cloud_sql_instance_name>/.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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.