# PL/R

> implementation of the R programming language for PostgreSQL database systems

**Wikidata**: [Q114269984](https://www.wikidata.org/wiki/Q114269984)  
**Source**: https://4ort.xyz/entity/pl-r

## Summary
PL/R is an implementation of the R programming language for PostgreSQL database systems, allowing users to write and execute R scripts directly within PostgreSQL stored procedures. It enables statistical analysis and data manipulation within the database environment, combining the power of R with PostgreSQL's relational capabilities.

## Key Facts
- **Implementation of R in PostgreSQL**: PL/R allows R code to be executed as stored procedures within PostgreSQL.
- **License**: Released under the GNU General Public License, version 2.0.
- **Latest stable version**: 8.4.7 (as of 2024-08-05).
- **First release**: January 21, 2003.
- **Primary use**: Stored procedures for statistical and data analysis tasks.
- **Programming paradigm**: Procedural programming.
- **Dialect of**: R programming language.
- **Copyright status**: Copyrighted.
- **Source code repositories**:
  - Primary: [GitHub - postgres-plr/plr](https://github.com/postgres-plr/plr) (since March 12, 2016).
  - Legacy: [GitHub - jconway/plr](https://github.com/jconway/plr) (since April 7, 2010).

## FAQs
### Q: What is PL/R used for?
A: PL/R is used to execute R scripts within PostgreSQL stored procedures, enabling statistical analysis and data manipulation directly in the database environment.

### Q: Who developed PL/R?
A: PL/R was developed by the community, with the primary repository hosted on GitHub under the postgres-plr organization.

### Q: Is PL/R open-source?
A: Yes, PL/R is open-source and licensed under the GNU General Public License, version 2.0.

### Q: What versions of PL/R are available?
A: The latest stable version is 8.4.7, released on August 5, 2024. Previous versions include 8.4.6 (August 2, 2023), 8.4.5 (November 5, 2021), and earlier releases dating back to 2003.

### Q: How does PL/R differ from other PostgreSQL extensions?
A: Unlike general-purpose extensions, PL/R is specifically designed to integrate R's statistical and data analysis capabilities into PostgreSQL, making it unique for its domain.

## Why It Matters
PL/R bridges the gap between relational databases and statistical computing by allowing R scripts to be executed within PostgreSQL. This integration simplifies data analysis workflows, as users can perform complex statistical operations directly on database-stored data without extracting and processing it externally. By combining the strengths of PostgreSQL's relational model and R's statistical capabilities, PL/R provides a powerful tool for data scientists and analysts. Its open-source nature ensures accessibility and community-driven development, making it a valuable resource for both academic and commercial applications.

## Notable For
- **First release**: One of the earliest implementations of R within a relational database system.
- **Stable releases**: Regular updates and maintenance, with the latest stable version (8.4.7) released in 2024.
- **Community-driven**: Actively maintained on GitHub with contributions from developers worldwide.
- **Integration**: Seamlessly combines PostgreSQL's relational capabilities with R's statistical functions.
- **Open-source**: Licensed under the GNU GPL, ensuring free and open access to the codebase.

## Body
### Overview
PL/R is a procedural language handler for PostgreSQL that enables the execution of R scripts within the database. It was first released on January 21, 2003, and has since evolved through multiple versions, with the latest stable release being 8.4.7, published on August 5, 2024.

### Development and Licensing
PL/R is developed as an open-source project, with its source code hosted on GitHub. The primary repository is [postgres-plr/plr](https://github.com/postgres-plr/plr), which has been active since March 12, 2016. The project is licensed under the GNU General Public License, version 2.0, ensuring its availability for modification and distribution.

### Versions and Updates
PL/R has undergone several updates, with notable releases including:
- **8.3.0.17**: Released on October 17, 2016.
- **8.3.0.18**: Released on October 1, 2018.
- **8.4**: Released on June 6, 2019.
- **8.4.1 to 8.4.6**: Released between 2020 and 2023, with the latest stable version, 8.4.7, released in 2024.

### Technical Details
PL/R is classified as a domain-specific language and a procedural programming language. It is designed to be used as a stored procedure within PostgreSQL, leveraging R's capabilities for statistical analysis and data manipulation. The language is a dialect of R, inheriting its syntax and functions while being integrated into PostgreSQL's ecosystem.

### Community and Support
The PL/R project benefits from community contributions and ongoing maintenance. The GitHub repository provides documentation and issue tracking, allowing users to report bugs and request features. The project's open-source nature encourages collaboration and innovation, making it a valuable tool for data analysis and research.

## References

1. [Source](https://github.com/postgres-plr/plr/blob/master/LICENSE)
2. [Release 8.3.0.17. 2016](https://github.com/postgres-plr/plr/releases/tag/REL8_3_0_17)
3. [Release 8.3.0.18. 2018](https://github.com/postgres-plr/plr/releases/tag/REL8_3_0_18)
4. [Release 8.4. 2019](https://github.com/postgres-plr/plr/releases/tag/REL8_4)
5. [Release 8.4.1. 2020](https://github.com/postgres-plr/plr/releases/tag/REL8_4_1)
6. [Release 8.4.2. 2021](https://github.com/postgres-plr/plr/releases/tag/REL8_4_2)
7. [Release 8.4.3. 2021](https://github.com/postgres-plr/plr/releases/tag/REL8_4_3)
8. [Release 8.4.4. 2021](https://github.com/postgres-plr/plr/releases/tag/REL8_4_4)
9. [Release 8.4.5. 2021](https://github.com/postgres-plr/plr/releases/tag/REL8_4_5)
10. [Release 8.4.6. 2023](https://github.com/postgres-plr/plr/releases/tag/REL8_4_6)
11. [Release 8.4.7. 2024](https://github.com/postgres-plr/plr/releases/tag/REL8_4_7)
12. [Release 8.4.8. 2025](https://github.com/postgres-plr/plr/releases/tag/REL8_4_8)
13. [Release 8.4.8.1. 2025](https://github.com/postgres-plr/plr/releases/tag/REL8_4_8_1)
14. [Release 8.4.8.2. 2025](https://github.com/postgres-plr/plr/releases/tag/REL8_4_8_2)
15. [Source](https://github.com/jconway/plr/releases/tag/start)
16. [Source](https://github.com/jconway/plr/blob/master/README.plr)