-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactors and fixes for schema cache #3644
Refactors and fixes for schema cache #3644
Commits on Jul 9, 2024
-
fix: Make --dump-schema work with in-database pgrst.db_schemas setting
This needs to be loaded from in-database configuration first, otherwise the dump-schema output will be for the default (public) schema.
Configuration menu - View commit details
-
Copy full SHA for a437446 - Browse repository at this point
Copy the full SHA a437446View commit details -
fix: Show number of loaded timezones in log output
There is no reason to hide those, right?
Configuration menu - View commit details
-
Copy full SHA for cf0b8f0 - Browse repository at this point
Copy the full SHA cf0b8f0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 67548a9 - Browse repository at this point
Copy the full SHA 67548a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for b940581 - Browse repository at this point
Copy the full SHA b940581View commit details -
refactor: Remove useless DISTINCT
There is already a GROUP BY in the same SELECT.
Configuration menu - View commit details
-
Copy full SHA for 1b8bea6 - Browse repository at this point
Copy the full SHA 1b8bea6View commit details -
refactor: Remove redundant conditions in schema cache
Those conditions are covered by the respective nspname = ANY branches.
Configuration menu - View commit details
-
Copy full SHA for e3ba0fb - Browse repository at this point
Copy the full SHA e3ba0fbView commit details -
refactor: Use ::regnamespace casts instead of comparing schemas by name
Casting pg_catalog to regnamespace is slightly more efficient, because the comparison will be oid-based, not text-based.
Configuration menu - View commit details
-
Copy full SHA for 85726ae - Browse repository at this point
Copy the full SHA 85726aeView commit details -
refactor: Make schema cache dumps more predictable with consistent ORDER
This helps diffing schema cache changes during development.
Configuration menu - View commit details
-
Copy full SHA for 26b93f4 - Browse repository at this point
Copy the full SHA 26b93f4View commit details -
Configuration menu - View commit details
-
Copy full SHA for f75e5c9 - Browse repository at this point
Copy the full SHA f75e5c9View commit details -
refactor: Replace pg_namespace joins with ::regnamespace in schema cache
Less joins are much easier to read and understand.
Configuration menu - View commit details
-
Copy full SHA for dbef7cd - Browse repository at this point
Copy the full SHA dbef7cdView commit details -
fix: List correct enum options when multiple types with same name are…
… present The schema cache and OpenAPI output would currently list the first found enum with the same name instead of the correct type. One other case where this comes up is when a regular type and an enum type have the same name. For example in the spec fixtures, we have an enum called "bit". Every "bit" type, no matter whether it's that enum or the built-in bit type, will show those enum options in the OpenApi output. Not adding a test, because OpenAPI is supposed to go away in the future anyway.
Configuration menu - View commit details
-
Copy full SHA for dbd48c5 - Browse repository at this point
Copy the full SHA dbd48c5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 617124c - Browse repository at this point
Copy the full SHA 617124cView commit details -
refactor: Simplify funcsSqlQuery
This allows to re-use ANY($$1) in the next commit.
Configuration menu - View commit details
-
Copy full SHA for 724b6c5 - Browse repository at this point
Copy the full SHA 724b6c5View commit details -
feat: Fail schema cache lookup with invalid db-schemas config
Previously, we'd silently report "200 OK" on the root endpoint, but would never return any endpoints from the schema cache. Now the schema cache query fails because of the ::regnamespace cast.
Configuration menu - View commit details
-
Copy full SHA for b6863f1 - Browse repository at this point
Copy the full SHA b6863f1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 67385de - Browse repository at this point
Copy the full SHA 67385deView commit details