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

feat: Remove dependency with uuid-ossp extension #5014

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jouir
Copy link

@jouir jouir commented Apr 8, 2024

Since PostgreSQL 13, the gen_random_uuid() function has reached the core. The uuid-ossp extension, providing the uuid_generate_v4() function, can be removed.

This is a breaking change for PostgreSQL 12 which will be maintained until November 14, 2024. An improvement would be to issue show server_version_num; query and use gen_random_uuid() if the result is higher or equal than 130000 or uuid_generate_v4(). Unfortunately, my Javascript skills are pretty limited so help would be appreciated.

References:

Since PostgreSQL 13, the gen_random_uuid() function has reached the core. The
uuid-ossp extension, providing the uuid_generate_v4() function, can be removed.

Signed-off-by: Julien Riou <[email protected]>
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Apr 8, 2024
Copy link

vercel bot commented Apr 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 8, 2024 7:31pm
langchainjs-docs ✅ Ready (Inspect) Visit Preview Apr 8, 2024 7:31pm

@jacoblee93
Copy link
Collaborator

Hey @jouir, thanks for the PR!

Is there a performance hit to using the extension? If not, then I would much prefer to wait for EOL before merging.

@jacoblee93 jacoblee93 added the question Further information is requested label Apr 9, 2024
@jouir
Copy link
Author

jouir commented Apr 9, 2024

Hello @jacoblee93,

There is no performance impact if the extension is used instead of the core function. The PR intent is to remove dependency with an extension and only rely on the core features of PostgreSQL. But using the extension until PostgreSQL 12 is not supported is fine.

@jacoblee93
Copy link
Collaborator

Yes, let's leave it for now then. Will revisit when EOL

@jacoblee93 jacoblee93 added the hold On hold label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:improvement Medium size change to existing code to handle new use-cases hold On hold question Further information is requested size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants