mirror of
https://github.com/sosedoff/pgweb.git
synced 2024-12-15 03:36:33 +03:00
Print a correct database server name when starting
This commit is contained in:
parent
e68c7e2c61
commit
1cbcb73948
@ -81,7 +81,7 @@ func initClient() {
|
||||
}
|
||||
|
||||
if !command.Opts.Sessions {
|
||||
fmt.Printf("Server runs PostgreSQL v%s\n", cl.ServerVersion())
|
||||
fmt.Printf("Conneced to %s\n", cl.ServerVersion())
|
||||
}
|
||||
|
||||
fmt.Println("Checking database objects...")
|
||||
|
@ -20,10 +20,10 @@ import (
|
||||
|
||||
var (
|
||||
postgresSignature = regexp.MustCompile(`(?i)postgresql ([\d\.]+)\s`)
|
||||
postgresType = "postgres"
|
||||
postgresType = "PostgreSQL"
|
||||
|
||||
cockroachSignature = regexp.MustCompile(`(?i)cockroachdb ccl v([\d\.]+)\s`)
|
||||
cockroachType = "cockroach"
|
||||
cockroachType = "CockroachDB"
|
||||
)
|
||||
|
||||
type Client struct {
|
||||
@ -297,7 +297,7 @@ func (client *Client) SetReadOnlyMode() error {
|
||||
}
|
||||
|
||||
func (client *Client) ServerVersion() string {
|
||||
return client.serverVersion
|
||||
return fmt.Sprintf("%s %s", client.serverType, client.serverVersion)
|
||||
}
|
||||
|
||||
func (client *Client) query(query string, args ...interface{}) (*Result, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user