mirror of
https://github.com/allankoechke/soci.git
synced 2026-11-30 10:58:24 +00:00
Remove manual connection string parsing from PostgreSQL backend
Use connection_parameters instead for simplicity and correctness: this fixes the equivalent of #1175 in this backend too.
This commit is contained in:
@@ -130,6 +130,17 @@ struct oid_table_creator : public table_creator_base
|
||||
}
|
||||
};
|
||||
|
||||
TEST_CASE("PostgreSQL connection string", "[postgresql][connstring]")
|
||||
{
|
||||
// There are no required parts in libpq connection string, so we can only
|
||||
// test that invalid options are detected.
|
||||
CHECK_THROWS_WITH(soci::session(backEnd, "bloordyblop=1"),
|
||||
Catch::Contains(R"(invalid connection option "bloordyblop")"));
|
||||
|
||||
CHECK_THROWS_WITH(soci::session(backEnd, "sslmode=bloordyblop"),
|
||||
Catch::Contains(R"(invalid sslmode value: "bloordyblop")"));
|
||||
}
|
||||
|
||||
// ROWID test
|
||||
// Note: in PostgreSQL, there is no ROWID, there is OID.
|
||||
// It is still provided as a separate type for "portability",
|
||||
|
||||
Reference in New Issue
Block a user