MCPcopy Create free account
hub / github.com/dolthub/doltgresql / GetPgCatalogCache

Function GetPgCatalogCache

core/context.go:125–131  ·  view source on GitHub ↗

GetPgCatalogCache returns a cache of data for pg_catalog tables. This function should only be used by pg_catalog table handlers. The catalog cache instance stores generated pg_catalog table data so that it only has to generated table data once per query. TODO: The return type here is currently any,

(ctx *sql.Context)

Source from the content-addressed store, hash-verified

123// TODO: The return type here is currently any, to avoid a package import cycle. This could be cleaned up by
124// introducing a new interface type, in a package that does not depend on core or pgcatalog packages.
125func GetPgCatalogCache(ctx *sql.Context) (any, error) {
126 cv, err := getContextValues(ctx)
127 if err != nil {
128 return nil, err
129 }
130 return cv.pgCatalogCache, nil
131}
132
133// SetPgCatalogCache sets |pgCatalogCache| as the catalog cache instance for this session.
134//

Callers 1

getPgCatalogCacheFunction · 0.92

Calls 1

getContextValuesFunction · 0.85

Tested by

no test coverage detected