node-postgres
node-postgres copied to clipboard
GCP CloudSQL connection with unix socket
Can you provide an example for connecting to GCP CloudSQL using unix socket?
Not sure why any part of this would be specific to the combination of pg and Cloud SQL, although it looks like Cloud SQL already has documentation at https://github.com/GoogleCloudPlatform/cloud-sql-nodejs-connector.
Why do you believe using a Unix socket should be possible for what looks like a remote database? Is that connection type documented for some other driver?
I think when connecting to a Cloud SQL instance you need to provide a connection string like /cloudsql/${GCP_PROJECT}:${CLOUDSQL_REGION}:${CLOUDSQL_INSTANCE_NAME}
.