16 lines
542 B
C++
16 lines
542 B
C++
#include <string>
|
|
#include "pgxx/pgxx.hpp"
|
|
|
|
auto main(int argc, char* args[]) -> int
|
|
{
|
|
const std::string password = "zHpQW0JaULlR1PugM2SRGrszBdRYGLL4SdIxg3trl3rSeaLJLAlDnCNs33RES+CX";
|
|
const std::string main_conn = "host=localhost port=5432 dbname=main_db user=chatlanin password=" + password;
|
|
const std::string replica_conn = "host=localhost port=5433 dbname=main_db user=chatlanin password=" + password;
|
|
|
|
auto& db = pgxx::database::instance();
|
|
db.init("main", main_conn, 20);
|
|
db.init("replica", replica_conn, 10);
|
|
|
|
return 0;
|
|
}
|