postgres: be explicit about an expression type for a test

This commit is contained in:
Ryan Leckey 2020-03-18 16:25:10 -07:00 committed by Austin Bonander
parent 40e1df78f1
commit 63f5592ecf
2 changed files with 3 additions and 3 deletions

View File

@ -119,6 +119,6 @@ macro_rules! Sqlite_query_for_test_prepared_type {
#[macro_export]
macro_rules! Postgres_query_for_test_prepared_type {
() => {
"SELECT {0} is not distinct from $1, $2::text as _1, {0}, $3 as _3"
"SELECT {0} is not distinct from $1, $2::text as _1, {0} as _2, $3 as _3"
};
}

View File

@ -141,7 +141,7 @@ mod chrono {
test_type!(chrono_date_time(
Postgres,
NaiveDateTime,
"'2019-01-02 05:10:20'" == NaiveDate::from_ymd(2019, 1, 2).and_hms(5, 10, 20)
"'2019-01-02 05:10:20'::timestamp" == NaiveDate::from_ymd(2019, 1, 2).and_hms(5, 10, 20)
));
test_type!(chrono_date_time_tz(
@ -256,7 +256,7 @@ DO $$ BEGIN
CREATE TYPE _sqlx_record_1 AS (_1 int8);
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
END $$;
"#,
)
.await?;