Cloud SQL for PostgreSQL documentation
Cloud SQL for PostgreSQL is a fully-managed database service that helps you set up, maintain, manage, and administer your PostgreSQL relational databases on Google Cloud Platform.
Start your proof of concept with $300 in free credit
- Get access to Gemini 2.0 Flash Thinking
- Free monthly usage of popular products, including AI APIs and BigQuery
- No automatic charges, no commitment
Keep exploring with 20+ always-free products
Access 20+ free products for common use cases, including AI APIs, VMs, data warehouses, and more.
Documentation resources
Guides
Related resources
Using Cloud SQL for PostgreSQL with Ruby on Rails 5
Learn how to connect a Ruby on Rails 5 app to Cloud SQL for PostgreSQL.
Connecting to Cloud SQL with Cloud Functions
Learn how to connect to Cloud SQL from Cloud Functions.
Deploying Pega using Compute Engine and Cloud SQL
Learn how to deploy Pega Platform, which is a business process management and customer relationship management (CRM) platform with Cloud SQL for PostgreSQL.
Production launch checklist
This checklist provides recommended activities to complete for launching a commercial application that uses Cloud SQL. This checklist focuses on Cloud SQL-specific activities.
Data residency overview
Learn how to use Cloud SQL to enforce data residency requirements for data.
Use Secret Manager to handle secrets in Cloud SQL
Learn how to use Secret Manager to store sensitive information about Cloud SQL instances and users as secrets.
Python SQLAlchemy
Use SQLAlchemy with your Cloud SQL for PostgreSQL database
Node.js sample
Connecting to your Cloud SQL for PostgreSQL database in Node.js
PHP PDO
Connecting your Cloud SQL for PostgreSQL database using PHP PDO
Go web app sample
Simple examples of connecting to Cloud SQL for PostgreSQL using Go
.NET sample
This sample application demonstrates how to store data in Google Cloud SQL with a PostgreSQL database when running in Google App Engine Flexible Environment.
Terraform for Cloud SQL networking
Use Terraform to create Cloud SQL for PostgreSQL instances with private networking options.
Java servlet
Connecting to Cloud SQL for PostgreSQL from a Java application
Related videos
Try Cloud SQL for yourself
New customers also get $300 in free credits to run, test, and deploy workloads.