Skip to content

Commit

Permalink
added display for PostgresVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
olexiyb committed Jun 14, 2024
1 parent e63cc9d commit 99aa5cc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/pg_fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ use crate::pg_types::PgResult;
/// Postgresql version struct (simple version wrapper)
#[derive(Debug, Copy, Clone)]
pub struct PostgresVersion(pub &'static str);

impl std::fmt::Display for PostgresVersion {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self.0)
}
}

/// Latest postgres version 16
pub const PG_V16: PostgresVersion = PostgresVersion("16.2.0");
/// Latest postgres version 15
Expand Down

0 comments on commit 99aa5cc

Please sign in to comment.