Skip to content

Commit 6e4afdb

Browse files
committed
Use pg_temp instead of a transaction for test
1 parent 0624cd6 commit 6e4afdb

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/test.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -857,17 +857,15 @@ fn test_generic_connection() {
857857
#[test]
858858
fn test_custom_range_element_type() {
859859
let conn = or_panic!(Connection::connect("postgres://postgres@localhost", SslMode::None));
860-
let trans = or_panic!(conn.transaction());
861-
or_panic!(trans.execute("CREATE TYPE floatrange AS RANGE (
860+
or_panic!(conn.execute("CREATE TYPE pg_temp.floatrange AS RANGE (
862861
subtype = float8,
863862
subtype_diff = float8mi
864863
)", &[]));
865-
let stmt = or_panic!(trans.prepare("SELECT $1::floatrange"));
864+
let stmt = or_panic!(conn.prepare("SELECT $1::floatrange"));
866865
match &stmt.param_types()[0] {
867866
&Type::Other(ref u) => {
868867
assert_eq!("floatrange", u.name());
869868
assert_eq!(&Kind::Range(Type::Float8), u.kind());
870-
assert_eq!("public", u.schema());
871869
}
872870
t => panic!("Unexpected type {:?}", t)
873871
}

0 commit comments

Comments
 (0)