Reputation: 93
The following code crashed
int main()
{
std::string connstring = "host=* port=* user=* password=* dbname=*";
pqxx::connection connection(connstring);
if (connection.is_open()) {
pqxx::work transaction(connection);
transaction.exec("SELECT 1;");
transaction.commit();
}
return 0;
}
With message:
double free or corruption
What am I doing wrong?
Upvotes: 1
Views: 356
Reputation: 93
I will answer myself. The following solution helped:
sudo apt-get remove libpq5
sudo apt-get install libpq-dev
Upvotes: 2