mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 08:20:25 +08:00 
			
		
		
		
	fix:libpq驱动支持gaussdb sha256加密登录
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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`注册名
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user