~/talk

How pg_query rewrites, deparses & formats any valid Postgres query

Talkat PGConf.dev 2026 · 2026-05-19..05-22· [databases]
name:Keiko Oda
links:none on file
name:Keiko Oda
links:none on file
slides:none on file

Library exposes a Protobuf-based AST and language bindings that let code walk and mutate real Postgres raw parse trees; implemented rewrites include turning certain OR conditions into UNIONs and materializing scans, yielding large speedups (orders-of-magnitude in the demo). A separate deep deparser and optional pretty‑print mode emits SQL (comments preserved best‑effort via the Postgres scanner) and deparser supports full Postgres syntax including DDL; tests run the full Postgres regression suite.

AI-written summary · about

  1. 0:00Introduction to PGQuery
  2. 3:56What is PGQuery
  3. 6:42Deparsing and formatting
  4. 7:03Query rewriting with PGQuery
  5. 17:46Why deterministic rewrites
  6. 19:11Formatting SQL queries
  7. 22:18PL/pgSQL support limitations
  8. 23:25Parameter syntax handling
  9. 24:47Testing deep parsing accuracy
  10. 26:08Q&A session
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.