текст ошибки
Код: Выделить всё
terminate called after throwing an instance of 'pqxx::broken_connection'
what(): connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "zxctatar" does not exist
Код: Выделить всё
#include
#include "../../include/Database.h"
Database::Database()
{
createDatabase();
}
void Database::createDatabase()
{
try
{
pqxx::connection connection_to_postgres_("host=127.0.0.1 port=5432 dbname=pg_database user=admin password=15900512"); // подклбчение к postgres серверу
if(connection_to_postgres_.is_open())
{
}
}
catch (const std::exception &e)
{
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79306259/cant-connect-to-postgresql-in-pqxx-c[/url]