settings

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package settings provides utility functions for working with settings, such as the search_path setting.

This package is intended to be a leaf in the package dependency graph, and should not add dependencies to other Doltgres packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCurrentSchemas

func GetCurrentSchemas(ctx *sql.Context) ([]string, error)

GetCurrentSchemas returns the session's effective search path: every schema named by the search_path setting that exists in the current database, in search_path order. Postgres only ever reports searchable schemas from current_schema() and current_schemas(), so entries naming no existing schema are dropped, as are repeats of a schema already on the path. That includes "$user", which expands to the session's user name and is typically dropped because no schema by that name exists. pg_catalog is not added here: it is only implicitly searched, and reporting it is current_schemas(true)'s job.

func GetCurrentSchemasAsMap

func GetCurrentSchemasAsMap(ctx *sql.Context) (map[string]struct{}, error)

GetCurrentSchemasAsMap returns the schemas from GetCurrentSchemas as a map for easy lookup.

Types

This section is empty.

Jump to

Keyboard shortcuts

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