Skip to content

Conversation

@burmecia
Copy link
Member

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. The embd type name needs to be changed to s3vec from 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 added create or replace for the custom functions.

Additional context

N/A

Copilot AI review requested due to automatic review settings November 25, 2025 07:55
@burmecia burmecia added the bug Something isn't working label Nov 25, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_replace attribute to the <==> operators and s3vec_distance function 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.

@burmecia burmecia merged commit 374cf9f into main Nov 25, 2025
12 checks passed
@burmecia burmecia deleted the bo/fix/upgrade-s3vectors branch November 25, 2025 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants