MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / WritePostgresConfiguration

Function WritePostgresConfiguration

pkg/configfile/configfile.go:138–143  ·  view source on GitHub ↗

WritePostgresConfiguration replaces the content of a PostgreSQL configuration file with the provided options

(
	fileName string,
	options map[string]string,
)

Source from the content-addressed store, hash-verified

136// WritePostgresConfiguration replaces the content of a PostgreSQL configuration
137// file with the provided options
138func WritePostgresConfiguration(
139 fileName string,
140 options map[string]string,
141) (changed bool, err error) {
142 return fileutils.WriteLinesToFile(fileName, UpdateConfigurationContents(nil, options))
143}
144
145// RemoveOptionsFromConfigurationContents deletes all the lines containing one of the given options
146// from the provided configuration content

Callers 2

Calls 1

Tested by

no test coverage detected