Skip to content
Next Next commit
feat(postgresql): Add star expander for SELECT * and RETURNING *
Adds a new expander package that expands * expressions in SQL queries
to explicit column names by preparing the query against a PostgreSQL
database.

Features:
- Expands SELECT * to explicit column list
- Preserves table prefix for qualified stars (e.g., table.*)
- Handles RETURNING * in INSERT/UPDATE/DELETE statements
- Recursively expands CTEs, including dependent CTEs
- Supports subqueries in FROM clause
- Works with both cgo (pganalyze/pg_query_go) and non-cgo
  (wasilibs/go-pgquery) builds

Example:
  SELECT * FROM authors
  → SELECT id, name, bio FROM authors

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
  • Loading branch information
kyleconroy and claude committed Dec 1, 2025
commit 5f89eb297d442509e2294872d8d7c4bb62b06317
Loading