Skip to content

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

Open

Description

@nyurik

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

Activity

  1. jim-mlodgenski commented on Dec 23, 2022

    @jim-mlodgenski
    Collaborator

    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

  2. nyurik commented on Dec 23, 2022

    @nyurik
    Author

    @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.

  3. kpamaran commented on Jan 27, 2023

    @kpamaran

    @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
  4. jim-mlodgenski commented on Jan 27, 2023

    @jim-mlodgenski
    Collaborator

    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

  5. seanlinsley commented on Apr 5, 2023

    @seanlinsley

    @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.

  6. mogul commented on Dec 9, 2023

    @mogul

    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.

  7. lu-zero commented on May 8, 2025

    @lu-zero

    Yet another blog post referring to plrust usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions