fix: extension upgrade issue with s3vectors_fdw#530
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses an extension upgrade issue in the s3vectors_fdw component when upgrading from version 0.5.6 onwards. The type name embd is being changed to s3vec, requiring proper handling of existing operators and functions during the upgrade process.
Key changes:
- Added
create_or_replaceattribute to the<==>operators ands3vec_distancefunction in Rust code - Added a DROP OPERATOR statement in bootstrap.sql to remove the old
<==> (jsonb, jsonb)operator before recreation
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| wrappers/src/fdw/s3vectors_fdw/s3vec.rs | Added create_or_replace attributes to operators and function definitions to allow upgrade replacement |
| wrappers/sql/bootstrap.sql | Added DROP OPERATOR statement for <==> (jsonb, jsonb) to prevent conflicts during upgrade |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
ivasilov
approved these changes
Nov 25, 2025
DenisBessa
pushed a commit
to DenisBessa/wrappers
that referenced
this pull request
Mar 12, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What kind of change does this PR introduce?
This PR is to fix issue when upgrade wrappers extension from 0.5.6 onwards.
What is the current behavior?
In version 0.5.6, s3vectors_fdw defined a custom type
embd, some custom functions and a custom operator<==>around that type. Theembdtype name needs to be changed tos3vecfrom 0.5.7, but current upgrade sql script cannot handle the upgrade properly.What is the new behavior?
Drop the custom operator
<==>beforehand in the bootstrap sql and addedcreate or replacefor the custom functions.Additional context
N/A