db
db copied to clipboard
Connect to databa schema
Will it be possible to configure a schema in the ConnectionURL?
This should be possible as of today.
connURL, err := postgresql.ParseURL(fmt.Sprintf("postgres://%s:%s@%s/%s?application_name=%s&search_path=%s",
username,
password,
host,
dbName,
appName,
schemaName
))
if err != nil {
return nil, err
}
if you're using postgresql.ConnectionURL directly, try setting the schema in the Options map: {"search_path": "yourSchema"}.