Skip to content

Commit

Permalink
Merge branch 'main' into random-test-cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoucheng361 committed Apr 19, 2024
2 parents ec36a96 + 6494d30 commit c539178
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/object/object_storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ func TestPG(t *testing.T) { //skip mutate

}
func TestPGWithSearchPath(t *testing.T) { //skip mutate
_, err := newSQLStore("postgres", "localhost:5432/test?sslmode=disable&search_path=juicefs,public", "", "")
_, err := newSQLStore("postgres", "127.0.0.1:5432/test?sslmode=disable&search_path=juicefs,public", "", "")
if !strings.Contains(err.Error(), "currently, only one schema is supported in search_path") {
t.Fatalf("TestPGWithSearchPath error: %s", err)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/object/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ func newSQLStore(driver, addr, user, password string) (ObjectStorage, error) {
uri = "postgres://" + uri
driver = "pgx"

parse, err := url.Parse(addr)
parse, err := url.Parse(uri)
if err != nil {
return nil, fmt.Errorf("parse url %s failed: %s", addr, err)
return nil, fmt.Errorf("parse url %s failed: %s", uri, err)
}
searchPath = parse.Query().Get("search_path")
if searchPath != "" {
Expand Down

0 comments on commit c539178

Please sign in to comment.