Repository navigation
fix(postgres): trust built-in rules where operand types resolve them #112
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
852773d
fix(postgres): trust a shadowed name where its operand types resolve it
colinhacks 90511be
fix(postgres): reduce an outer join by a test its operand types trust
colinhacks 7139f63
fix(postgres): trust a cast a user's cast function cannot be the one of
colinhacks 971365c
docs(site): say an extension leaves built-in calls the built-in's
colinhacks 5518f9c
fix(postgres): match a user's overload on a domain by its base type
colinhacks c5a002f
fix(postgres): check a test's cast against the cast targets
colinhacks 331b070
fix(postgres): read no aggregate where a type has the function's name
colinhacks 8fe851f
fix(postgres): read the trust query's operators from pg_catalog alone
colinhacks cade22b
test(oracle): run the user-operator case with public before pg_catalog
colinhacks 81dc959
refactor(postgres): drop the trust check's unread names
colinhacks 9163d02
fix(postgres): read no one-argument call as the built-in beside its type
colinhacks c3055c8
fix(postgres): convert nothing in the trust query a user's cast may take
colinhacks 92e8ac5
fix(postgres): read the server's version in the trust query by function
colinhacks 47dccd5
fix(postgres): keep count(*) an aggregate beside a type named count
colinhacks 805685e
fix(postgres): call no polymorphic built-in in the trust query
colinhacks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
t == column_type(andValueType::Adaptstwo lines up) still pins the key without askingCatalog::equality. So a user's=over exactly the key's types still counts: for examplepublic.=(int8, int8)undersearch_path = public, pg_catalog, whichtrust_user_operatorscreates. With that operator answering true,where id = 5::int8orwhere id = :preturns every row, yet staysmaybeOne. This predates the PR, but the PR now runs key equality through the resolution check. Running these two branches through it as well closes the hole and keeps the extension cases. pgvector's and PostGIS's=never take two built-in types, so(int8, int8)still resolves to the built-in there.Technical details
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, and as you say it predates this PR. It's the next change in this series: the follow-up resolves key equality through the same check, for both the untyped (
ValueType::Adapts) and exact-type (t == column_type) shortcuts, with an oracle case for a user=(int8, int8)that the search path puts first.