Help us shape the future of Go! Take the 2026 Go Developer Survey

summary

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 4 Imported by: 0

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).

Types

type Error

type Error struct {
	Message  string
	Filename string
	Funcname string
}

Error carries an ereport raised during the summary walk (there is exactly one reachable site: makeRangeVarFromNameList).

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL