Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tcdi/plrust
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.2.6
Choose a base ref
...
head repository: tcdi/plrust
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.2.7
Choose a head ref
  • 9 commits
  • 15 files changed
  • 3 contributors

Commits on Sep 19, 2023

  1. Migrates aarch64 CI runners to Ubuntu (#385)

    Ubuntu generally does not require workarounds or tricks to get Postgres
    + PL/Rust to play nicely, so we are going to move the CI runners to use
    Ubuntu 22.04 instead of AL2. This should make future updates a little
    less painless.
    BradyBonnette authored Sep 19, 2023
    Configuration menu
    Copy the full SHA
    d39c3b7 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2023

  1. Update Rust to 1.73.0 (#388)

    thomcc authored Oct 18, 2023
    Configuration menu
    Copy the full SHA
    4d21a39 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    89df8aa View commit details
    Browse the repository at this point in the history

Commits on Oct 20, 2023

  1. Configuration menu
    Copy the full SHA
    7182c92 View commit details
    Browse the repository at this point in the history
  2. Adds CNAME file to correct location for doc generation (#392)

    Previous run was a bust. This should be the correct spot.
    BradyBonnette authored Oct 20, 2023
    Configuration menu
    Copy the full SHA
    87a9082 View commit details
    Browse the repository at this point in the history

Commits on Nov 18, 2023

  1. Revert "Update Rust to 1.73.0 (#388)"

    This reverts commit 4d21a39.
    eeeebbbbrrrr committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    a314012 View commit details
    Browse the repository at this point in the history
  2. Add dynamic function call support (#390)

    This adds support for pgrx' `fn_call` interface that enables calling
    other schema-defined functions dynamically.
    
    The only code changes, as it were, are in the `plrust-trusted-pgrx`
    reexport crate. The bulk of this PR is adding a little chapter to the
    book along with a simple unit test.
    eeeebbbbrrrr authored Nov 18, 2023
    Configuration menu
    Copy the full SHA
    a068dff View commit details
    Browse the repository at this point in the history
  3. Prepare v1.2.7 (#398)

    Welcome to PL/Rust v1.2.7. This is a small feature release that adds the
    ability to call user defined functions (UDFs) from a `LANGUAGE plrust`
    function.
    
    As a contrived example, perhaps your database has a `LANGUAGE sql`
    function like:
    
    ```sql
    CREATE OR REPLACE FUNCTION sum_array(a int[]) RETURNS int STRICT LANGUAGE sql AS $$ 
        SELECT sum(e) FROM unnest(a) e 
    $$;
    ```
    
    And you wish to call it from a PL/Rust function.  Well, now you can!  
    
    ```sql
    CREATE OR REPLACE FUNCTION transform_array(a int[]) RETURNS int STRICT LANGUAGE plrust AS $$
        // add one to every element of `a`, the input argument array, collecting into a new Vec
        let a = a.into_iter().map(|e| e.unwrap_or(0) + 1).collect::<Vec<_>>();  
    
        // call the existing "sum_array(int[])" function to sum the values of `a`
        Ok(fn_call("sum_array", &[&Arg::Value(a)])?)
    $$;
    
    SELECT transform_array(ARRAY[1,2,3]);
    transform_array 
    -----------------
                   9
    (1 row)
    ```
    
    PL/Rust's dynamic function call API is documented in [the
    book](https://tcdi.github.io/plrust).
    
    Other than also upgrading the underlying `pgrx` dependency to v0.11.0,
    there have been no other changes to PL/Rust since v1.2.6.
    
    This release took quite a bit longer than expected as we had a desire to
    upgrade it to work with Rust v1.73.0. Unfortunately, rustc v1.73.0
    introduced a bug around custom lints and it took our team *weeks* to
    track this down and ultimately provide the Rust project a PR. Based on
    Rust's release schedule, that fix won't be released until v1.75.0.
    
    
    ### A note on Postgres 16 support
    
    Postgres 16 has added some "SIMD" code, and includes the compiler
    built-in header for SIMD support. This can cause compilation problems
    with pgrx if the host system has multiple `clang` versions installed.
    It's suggested a machine running PL/Rust only have one `clang` version
    and the matching `llvm` packages installed. It doesn't seem to matter
    which version, only that there's one.
    eeeebbbbrrrr authored Nov 18, 2023
    Configuration menu
    Copy the full SHA
    f631af3 View commit details
    Browse the repository at this point in the history
  4. Merge branch 'develop'

    eeeebbbbrrrr committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    ff6f46d View commit details
    Browse the repository at this point in the history
Loading