Print postgres version on start in a single-session mode
This commit is contained in:
@@ -79,6 +79,10 @@ func initClient() {
|
|||||||
exitWithMessage(err.Error())
|
exitWithMessage(err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !command.Opts.Sessions {
|
||||||
|
fmt.Printf("Server runs PostgreSQL v%s\n", cl.ServerVersion())
|
||||||
|
}
|
||||||
|
|
||||||
fmt.Println("Checking database objects...")
|
fmt.Println("Checking database objects...")
|
||||||
_, err = cl.Objects()
|
_, err = cl.Objects()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -260,6 +260,10 @@ func (client *Client) SetReadOnlyMode() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (client *Client) ServerVersion() string {
|
||||||
|
return client.serverVersion
|
||||||
|
}
|
||||||
|
|
||||||
func (client *Client) query(query string, args ...interface{}) (*Result, error) {
|
func (client *Client) query(query string, args ...interface{}) (*Result, error) {
|
||||||
// We're going to force-set transaction mode on every query.
|
// We're going to force-set transaction mode on every query.
|
||||||
// This is needed so that default mode could not be changed by user.
|
// This is needed so that default mode could not be changed by user.
|
||||||
|
|||||||
Reference in New Issue
Block a user