aboutsummaryrefslogtreecommitdiffstats
path: root/internal/storage/postgresql.go
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2024-03-10 20:03:50 -0400
committerEugene Triguba <eugenetriguba@gmail.com>2024-03-10 20:03:50 -0400
commitf0ee4ba310f7034f549570a0833ac7ba41e9ab7f (patch)
tree8791281d7c144209d2d3dd1b99e785f294dcdeab /internal/storage/postgresql.go
parentUse pgx v5 and update changelog (diff)
downloadcli-f0ee4ba310f7034f549570a0833ac7ba41e9ab7f.zip
Add adapter tests
Diffstat (limited to 'internal/storage/postgresql.go')
-rw-r--r--internal/storage/postgresql.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/storage/postgresql.go b/internal/storage/postgresql.go
index f728514..dee0288 100644
--- a/internal/storage/postgresql.go
+++ b/internal/storage/postgresql.go
@@ -55,7 +55,7 @@ func (p PostgresqlAdapter) TableExists(
func (p PostgresqlAdapter) DatabaseName(executor sqlExecutor) (string, error) {
var name string
- err := executor.QueryRow("SELECT database_name();").Scan(&name)
+ err := executor.QueryRow("SELECT current_database();").Scan(&name)
if err != nil {
return "", fmt.Errorf("unable to retrieve database name: %w", err)
}