~/talk

Time to Go with PostgreSQL

Talkat PGConf.dev 2024 · 2024-05-28..05-31· [databases, go]
links:none on file
slides:none on file

Adds a Go module into an existing C PostgreSQL extension (PGDeepThinker) to parse queries and emit advisory messages; uses cgo, a C-side parser (libpg_query / "lipq query") and gjson to turn parse trees into JSON and then extract patterns. Code shrinks from roughly 15 lines to 4 for many checks, making new pattern checks quick to add. Works in practice but increases binary size, requires C-shared/C-archive build and limits cross-language returns to simple strings or pointers.

AI-written summary · about

  1. 0:00Introduction to talk
  2. 1:08Cybertech and PG extensions
  3. 3:35Poor SQL detection in PG Deep Thinker
  4. 7:50Motivation for using Go
  5. 10:19Setting up Go for PostgreSQL
  6. 12:05Exporting Go functions to C
  7. 14:59Compiling Go with PostgreSQL
  8. 16:28Benefits of Go integration
  9. 17:10Drawbacks and limitations
  10. 19:15Conclusion and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 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
?
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.