Skip to content
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

chore: set schema and search_path #273

Merged
merged 6 commits into from
Jan 16, 2024
Merged

chore: set schema and search_path #273

merged 6 commits into from
Jan 16, 2024

Conversation

usamoi
Copy link
Collaborator

@usamoi usamoi commented Jan 15, 2024

@cutecutecat
Copy link
Member

Is the search_path global and would be shared by other extensions?

@cutecutecat
Copy link
Member

cutecutecat commented Jan 16, 2024

It seems that this PR would fix pgvecto.rs target schema to vectors and require user to explicit set it.

Apart from this, I see there is a way of An extension might be relocatable during installation but not afterwards.
ref: https://www.postgresql.org/docs/16/extend-extensions.html#EXTEND-EXTENSIONS-RELOCATION

Could we set location at create script as:

SET LOCAL search_path TO @extschema@, public;

And use a pg function current_schema() to get it at regtypein and regoperatorin?
ref: https://www.postgresql.org/docs/16/functions-info.html#FUNCTIONS-INFO-SESSION

@usamoi
Copy link
Collaborator Author

usamoi commented Jan 16, 2024

Is the search_path global and would be shared by other extensions?

search_path can be local.

@usamoi
Copy link
Collaborator Author

usamoi commented Jan 16, 2024

use a pg function current_schema() to get it at regtypein and regoperatorin?

I think it's not how current_schema() works.

Copy link
Member

@cutecutecat cutecutecat left a comment

Choose a reason for hiding this comment

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

This PR would lock pgvecto.rs operators installed at vectors schema.

Affect

CREATE EXTENSION vectors WITH SCHEMA xxx is forbidden from now.

Instead, user need to alter search_path=vectors to enable global access of operators and search_path=vectors, xxx to access other schema optional.

cc @VoVAllen

@usamoi usamoi added this pull request to the merge queue Jan 16, 2024
Merged via the queue into tensorchord:main with commit da6686e Jan 16, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: install at schema would fail at create index
3 participants