Documentation
¶
Overview ¶
pg_qsort (src/port/qsort.c via lib/sort_template.h): the Bentley & McIlroy quicksort PostgreSQL uses — list_sort() maps to it at the pin (port.h defines qsort as pg_qsort). It is not stable, so the order of equal-priority truncations depends on the exact algorithm; byte-parity needs the algorithm, not just the comparator. Same port as internal/normalize/qsort.go, over possible truncations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Summarize ¶
func Summarize(tree *ast.ParseResult, truncateLimit int) (result *ast.SummaryResult, err error)
Summarize is pg_query_summary_internal (pg_query_summary.c) minus the raw parse, which the caller has already done: the summary walk, the statement-type walk, and — when truncateLimit is not -1 — the truncation pass.
func SummarizeWithEmpties ¶
func SummarizeWithEmpties(tree *ast.ParseResult, truncateLimit int, empties map[any]bool) (result *ast.SummaryResult, err error)
SummarizeWithEmpties is Summarize with the parser's present-but-empty string set, which the truncation deparse needs (the C summary deparses the original tree, where COMMENT ... IS ” is non-NULL).