PostgreSQL
Query PostgreSQL from any myai canvas, function, or chat — over the standard wire protocol with full transaction support.
PostgreSQL is the operational database most modern stacks default to — and the place most application-tier data actually lives. The integration treats Postgres as a first-class data source for chats, canvases, and functions, with full SQL execution, schema introspection, and JSONB-aware queries.
What you can do
- Pull live records into a chat — "show me the 10 most recent customers in the trial cohort" returns a structured table from your live Postgres, not a stale export.
- Run analytical SQL from a function — joins, aggregates, CTEs, window functions — anything Postgres can express.
- JSONB-aware queries — for the columns where your data is actually stored as documents, not normalized tables.
- Full-text search — built into Postgres, exposed through the integration without needing a separate search service.
- Transaction management — multi-statement writes wrap in a transaction; rollback on error is the default.
- Schema introspection — what tables exist, what columns they have, what indexes back them — queryable as structured data.
How to connect
Standard PostgreSQL wire protocol over TCP. Provide host, port, username, password, and optional database name. SSL/TLS modes supported (disable, prefer, require, verify-ca, verify-full) — use require or stronger for cloud-hosted instances.
The integration honors whatever permissions the database user has — grant only what the workflows need.
Connect PostgreSQL in myaiCommon use cases
- Operational dashboards that mix Postgres application data with warehouse data (BigQuery, Snowflake) in a single canvas.
- Customer-facing reports generated from Postgres without standing up a separate analytics tier.
- Daily ops digests — scheduled function reads yesterday's operational state, summarizes anomalies, posts to the team's chat.
Reference
- Connection model: PostgreSQL wire protocol (TCP)
- Auth: username + password (SSL strongly recommended for cloud instances)
- Scope: ~8 operations spanning SQL execution, schema introspection, transactions
- For Supabase specifically (which is Postgres under the hood with auth/storage/realtime on top), see Supabase