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

Method GetTemplateDB

pkg/management/postgres/instance.go:913–915  ·  view source on GitHub ↗

GetTemplateDB gets a connection to the "template1" database on this instance

()

Source from the content-addressed store, hash-verified

911
912// GetTemplateDB gets a connection to the "template1" database on this instance
913func (instance *Instance) GetTemplateDB() (*sql.DB, error) {
914 return instance.ConnectionPool().Connection("template1")
915}
916
917// GetPgVersion queries the postgres instance to know the current version, parses it and memoize it for future uses
918func (instance *Instance) GetPgVersion() (semver.Version, error) {

Callers

nothing calls this directly

Calls 2

ConnectionPoolMethod · 0.95
ConnectionMethod · 0.65

Tested by

no test coverage detected