This only adds support for fetching non-public schemas. This does actually allow generating migration plans for non-public schemas because we will need plumb several into the sql generation code to account for schemas.
I opted to do the filtering in-memory because it is way more flexible to do the filtering in-memory rather than in the queries. We can easily support things like regex and complex nested operations in the future (unions of intersections, etc). I don't expect the filters to significantly reduce the number of schema objects being fetched, so the performance impact of doing it in-memory is minimal.
Description
This only adds support for fetching non-public schemas. This does actually allow generating migration plans for non-public schemas because we will need plumb several into the sql generation code to account for schemas.
I opted to do the filtering in-memory because it is way more flexible to do the filtering in-memory rather than in the queries. We can easily support things like regex and complex nested operations in the future (unions of intersections, etc). I don't expect the filters to significantly reduce the number of schema objects being fetched, so the performance impact of doing it in-memory is minimal.
Motivation
https://github.com/stripe/pg-schema-diff/issues/94
Testing
Tested via unit tests