Skip to content

Commit 63f5592

Browse files
mehcodeabonander
authored andcommitted
postgres: be explicit about an expression type for a test
1 parent 40e1df7 commit 63f5592

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sqlx-test/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,6 @@ macro_rules! Sqlite_query_for_test_prepared_type {
119119
#[macro_export]
120120
macro_rules! Postgres_query_for_test_prepared_type {
121121
() => {
122-
"SELECT {0} is not distinct from $1, $2::text as _1, {0}, $3 as _3"
122+
"SELECT {0} is not distinct from $1, $2::text as _1, {0} as _2, $3 as _3"
123123
};
124124
}

tests/postgres-types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ mod chrono {
141141
test_type!(chrono_date_time(
142142
Postgres,
143143
NaiveDateTime,
144-
"'2019-01-02 05:10:20'" == NaiveDate::from_ymd(2019, 1, 2).and_hms(5, 10, 20)
144+
"'2019-01-02 05:10:20'::timestamp" == NaiveDate::from_ymd(2019, 1, 2).and_hms(5, 10, 20)
145145
));
146146

147147
test_type!(chrono_date_time_tz(
@@ -256,7 +256,7 @@ DO $$ BEGIN
256256
CREATE TYPE _sqlx_record_1 AS (_1 int8);
257257
EXCEPTION
258258
WHEN duplicate_object THEN null;
259-
END $$;
259+
END $$;
260260
"#,
261261
)
262262
.await?;

0 commit comments

Comments
 (0)