Manage Cloud SQL with psql via Cloud SQL proxy

cloud-sql psql

Connect to DB via psql:

psql "host=127.0.0.1 sslmode=disable dbname=DB_NAME user=USERNAME"

Grant all privileges to a specific user:

GRANT ALL PRIVILEGES ON DATABASE local TO USERNAME;

Enable PostgreSQL extension for Trigram Similarity search:

CREATE EXTENSION pg_trgm;

You might be interested in these notes:

  • Couldn't find similar notes.