Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL
All skills

querying-local-postgres

Run read-only SQL against the local PostHog Postgres database and show results with interpretation.

When to use it

You have a local PostHog Postgres running and need to check why a team, project, or feature-flag row looks wrong, or inspect a slow query's plan.

For example

You say

Use querying-local-postgres to check whether team 42 has duplicate feature-flag rows in posthog_featureflag and show the SQL.

You get
  • Read-only SQL query
  • Row results
  • Brief interpretation

How it works

  • Writes are refused; only SELECT, EXPLAIN, and EXPLAIN ANALYZE on SELECT are allowed.
  • Connections are forced read-only so accidental writes are rejected.
  • Analytics event data lives in ClickHouse, not Postgres.

Before installing

Requires a reachable local Postgres (default postgres://posthog:posthog@localhost:5432/posthog) and the psql client.