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

Please provide/document a way to create Rust extensions #163

Open
nyurik opened this issue Dec 23, 2022 · 6 comments
Open

Please provide/document a way to create Rust extensions #163

nyurik opened this issue Dec 23, 2022 · 6 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@nyurik
Copy link

nyurik commented Dec 23, 2022

Describe the problem

I would like to be able to add Rust extensions to postgres to perform complex server-side computations.

Describe alternatives

Host my own PostgreSQL and build a rust extension using one of many documented paths like this

@nyurik nyurik added the enhancement New feature or request label Dec 23, 2022
@jim-mlodgenski
Copy link
Contributor

pg_tle is language agnostic and can use any procedural language available on the database instance. If you'd like to use Rust, you'll want to explore PL/Rust https://github.com/tcdi/plrust

@nyurik
Copy link
Author

nyurik commented Dec 23, 2022

@jim-mlodgenski thanks for the link! I was looking at the list of extensions available on RDS, and plrust is not one of them, so I was hoping that pg_tle would somehow enable it, especially considering all AWS support of Rust.

The only relevant available extensions seem to be plcoffee, plls, plperl, plpgsql, pltcl, plv8.

@jkatz jkatz added the documentation Improvements or additions to documentation label Dec 29, 2022
@kpamaran
Copy link

kpamaran commented Jan 27, 2023

@nyurik I'm interested in this problem as well. I found these slides from AWS re:Invent that lists PL/Rust as a trusted language but it may be jumping ahead of itself, because there's also slide in the TLE segment of the Aurora innovations deep dive video from Dec 2022 re:Invent that says "Coming soon: Rust"

  1. https://d1.awsstatic.com/events/Summits/reinvent2022/OPN307_NEW-LAUNCH!-Adding-safe-extensions-to-PostgreSQL.pdf
  2. https://www.youtube.com/watch?v=pzZydB78Eyc

@jim-mlodgenski
Copy link
Contributor

PL/Rust is an active community project that does provide an trusted language handler for PostgreSQL and works well with TLE today. It is a little complex to build and setup, but the PL/Rust community has some documentation on how to do that.
https://github.com/tcdi/plrust

@seanlinsley
Copy link

seanlinsley commented Apr 5, 2023

@jim-mlodgenski could you link to documentation showing how to use pg_tle with PL/Rust especially when running in an AWS managed database? I can't find any documentation (or even comments) suggesting it's possible, other than your comment here.

@mogul
Copy link

mogul commented Dec 9, 2023

I found this blog post:

In this post, we show how to deploy an RDS for PostgreSQL instance with PL/Rust enabled

[...]

PL/Rust also gives developers another language option for writing Trusted Language Extensions for PostgreSQL, allowing Rust-based extensions to be installed directly from a SQL interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants