From 944290a3eaa6379e69d39c015c71a36a4816842a Mon Sep 17 00:00:00 2001 From: Shadaj Laddad Date: Sat, 13 Apr 2024 18:45:44 -0700 Subject: [PATCH] Use types from the lighter-weight postgres-types --- Cargo.toml | 5 +++-- src/postgres_ext/vector.rs | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f64dc9e..8095551 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,16 +14,17 @@ doctest = false [dependencies] bytes = { version = "1", optional = true } -postgres = { version = "0.19", default-features = false, optional = true } +postgres-types = { version = "0.2", default-features = false, optional = true } diesel = { version = "2", default-features = false, features = ["postgres"], optional = true } sqlx = { version = ">= 0.5, < 0.8", default-features = false, features = ["postgres"], optional = true } serde = { version = "1", features = ["derive"], optional = true } [dev-dependencies] +postgres = { version = "0.19", default-features = false } diesel = { version = "2", default-features = false, features = ["32-column-tables"] } sqlx = { version = "0", default-features = false, features = ["runtime-async-std-native-tls"] } async-std = { version = "1", features = ["attributes"] } serde_json = "1" [features] -postgres = ["dep:postgres", "dep:bytes"] +postgres = ["dep:postgres-types", "dep:bytes"] diff --git a/src/postgres_ext/vector.rs b/src/postgres_ext/vector.rs index 1022f6d..e921cba 100644 --- a/src/postgres_ext/vector.rs +++ b/src/postgres_ext/vector.rs @@ -1,5 +1,5 @@ use bytes::{BufMut, BytesMut}; -use postgres::types::{to_sql_checked, FromSql, IsNull, ToSql, Type}; +use postgres_types::{to_sql_checked, FromSql, IsNull, ToSql, Type}; use std::convert::TryInto; use std::error::Error;