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)
| 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. |
| 125 | func 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 | // |
no test coverage detected