Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions internal/engine/postgresql/catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@ func NewCatalog() *catalog.Catalog {
c.SearchPath = []string{"pg_catalog"}
return c
}

// The generated pg_catalog is very slow to compare because it has so
// many entries. For testing, don't include it.
func newTestCatalog() *catalog.Catalog {
c := catalog.New("public")
c.Schemas = append(c.Schemas, pgTemp())
return c
}
4 changes: 2 additions & 2 deletions internal/engine/postgresql/catalog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -564,13 +564,13 @@ func TestUpdate(t *testing.T) {
t.Fatal(err)
}

c := NewCatalog()
c := newTestCatalog()
if err := c.Build(stmts); err != nil {
t.Log(test.stmt)
t.Fatal(err)
}

e := NewCatalog()
e := newTestCatalog()
if test.s != nil {
var replaced bool
for i := range e.Schemas {
Expand Down