fix:libpq驱动支持gaussdb sha256加密登录

This commit is contained in:
刘宗洋
2023-11-28 14:33:53 +08:00
parent e4447e6bc2
commit 82c17a51a2
3 changed files with 7 additions and 6 deletions

View File

@@ -4,8 +4,8 @@ import (
"fmt"
"strings"
pq "gitee.com/liuzongyang/libpq"
"github.com/kanzihuang/vitess/go/vt/sqlparser"
"github.com/lib/pq"
)
type DbType string

View File

@@ -12,11 +12,11 @@ import (
"strings"
"time"
"github.com/lib/pq"
pq "gitee.com/liuzongyang/libpq"
)
func getPgsqlDB(d *DbInfo) (*sql.DB, error) {
driverName := string(d.Type)
driverName := "postgres"
// SSH Conect
if d.SshTunnelMachineId > 0 {
// 如果使用了隧道,则使用`postgres:ssh:隧道机器id`注册名