This TypeScript example lets an LLM interact with PostgreSQL through function calling. It supports read-only queries, table creation, inserts, updates, deletes, table listing, and schema inspection.
DATABASE_URL=postgres://username:password@localhost:5432/database_name