PL/PRQL in PostgreSQL is an extension allowing the creation of functions with PRQL, supporting PostgreSQL v12-16 on Linux and macOS. PRQL, or Pipelined Relational Query Language, simplifies complex data manipulation by introducing a pipeline concept similar to Unix pipes. By writing functions with PRQL, large analytical queries become more manageable, making data manipulation logic easier to read and write. The PRQL compiler can be used to see the SQL statements executed by PostgreSQL, and PRQL can be run directly in ORMs for custom queries. PRQL supports select statements only and can be installed from source for development and testing.
https://github.com/kaspermarstal/plprql