42 releases
Uses new Rust 2024
| 0.20.2 | Feb 22, 2026 |
|---|---|
| 0.20.0 | Aug 31, 2025 |
| 0.19.0 | Jun 24, 2025 |
| 0.18.2 | Mar 21, 2025 |
| 0.14.2 | Jul 17, 2024 |
#404 in Database interfaces
332,524 downloads per month
Used in 26 crates
(4 directly)
420KB
12K
SLoC
PostgreSQL Commands
A library for executing PostgreSQL command line utilities.
Examples
use postgresql_commands::Result;
use postgresql_commands::psql::PsqlBuilder;
fn main() -> Result<()> {
let psql = PsqlBuilder::new()
.command("CREATE DATABASE \"test\"")
.host("127.0.0.1")
.port(5432)
.username("postgresql")
.pg_password("password")
.build();
let (stdout, stderr) = psql.execute()?;
Ok(())
}
Feature flags
The following features are available:
| Name | Description | Default? |
|---|---|---|
tokio |
Enables the use of tokio commands | No |
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Dependencies
~4.5–8MB
~70K SLoC