Skip to content

Commit 9da84d8

Browse files
author
Uziel Silva
committed
feat: Add support for psycopg
Changelog: - Add proxy for connections that can only be made through an unix socket, to support the TLS connection - Add support for psycopg, using the proxy server - Add unit and integration tests - Update docs
1 parent 280b72c commit 9da84d8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

google/cloud/sql/connector/proxy.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ def start_local_proxy(
2525
ssl_sock,
2626
socket_path,
2727
):
28-
desired_path = Path(socket_path)
28+
path_parts = socket_path.rsplit('/', 1)
29+
parent_directory = '/'.join(path_parts[:-1])
30+
31+
desired_path = Path(parent_directory)
2932
desired_path.mkdir(parents=True, exist_ok=True)
3033

3134
if os.path.exists(socket_path):

0 commit comments

Comments
 (0)