MCPcopy Create free account
hub / github.com/CrunchyData/postgres-operator / ShellPath

Function ShellPath

internal/postgres/config.go:267–275  ·  view source on GitHub ↗

ShellPath returns a POSIX shell command that prepends typical Postgres executable paths to the PATH variable.

(postgresVersion int32)

Source from the content-addressed store, hash-verified

265
266// ShellPath returns a POSIX shell command that prepends typical Postgres executable paths to the PATH variable.
267func ShellPath(postgresVersion int32) string {
268 return fmt.Sprintf(`PATH="`+
269 strings.Join([]string{
270 `/usr/lib/postgresql/%[1]d/bin`, // Debian
271 `/usr/libexec/postgresql%[1]d`, // Alpine
272 `/usr/pgsql-%[1]d/bin`, // Red Hat
273 }, ":")+
274 `${PATH+:${PATH}}"`, postgresVersion)
275}
276
277// reloadCommand returns an entrypoint that convinces PostgreSQL to reload
278// certificate files when they change. The process will appear as name in `ps`

Callers 6

upgradeCommandFunction · 0.92
removeDataCommandFunction · 0.92
InstancePodFunction · 0.92
RestoreCommandFunction · 0.92
TestShellPathFunction · 0.85
startupCommandFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestShellPathFunction · 0.68