We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue migrated from trac ticket # 556
component: DBA GUI | priority: major
int PGSQL_CONN::connect(const char *database) { if(connected && db == database) return 0; else close_conn(); char conninfo[256]; sprintf(conninfo, "dbname=%s host=%s port=%d user=%s password=%s", database, ip.c_str(), port, user.c_str(), pwd.c_str()); conn = PQconnectdb(conninfo); if (PQstatus(conn) != CONNECTION_OK) { syslog(Logger::ERROR, "Connected to pgsql fail: %s", PQerrorMessage(conn)); PQfinish(conn); //pg socket leak. return 1; } db = database; connected = true; return 0; }
int PGSQL_CONN::connect(const char *database) { if(connected && db == database) return 0; else close_conn();
char conninfo[256]; sprintf(conninfo, "dbname=%s host=%s port=%d user=%s password=%s", database, ip.c_str(), port, user.c_str(), pwd.c_str());
conn = PQconnectdb(conninfo);
if (PQstatus(conn) != CONNECTION_OK) { syslog(Logger::ERROR, "Connected to pgsql fail: %s", PQerrorMessage(conn));
PQfinish(conn); //pg socket leak. return 1;
}
db = database; connected = true;
return 0; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Issue migrated from trac ticket # 556
component: DBA GUI | priority: major
2022-04-06 17:42:08: barney created the issue
The text was updated successfully, but these errors were encountered: