First Commit
/ build_macos (push) Has been cancelled
/ build_windows (push) Has been cancelled
/ build_ubuntu (push) Has been cancelled

This commit is contained in:
dsutanto committed 2025-11-19 16:23:45 +07:00
commit dbdc5bcc4a
1791 files changed
+489451

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
// Remove large objects given on the command line from the default database.
#include <iostream>
#include "pqxx/pqxx"
int main(int, char *argv[])
{
pqxx::connection conn;
bool failures = false;
try
{
for (int i{1}; argv[i]; ++i)
{
auto o{pqxx::from_string<pqxx::oid>(argv[i])};
try
{
pqxx::perform([o, &conn] {
pqxx::work tx{conn};
pqxx::blob::remove(tx, o);
tx.commit();
});
}
catch (std::exception const &e)
{
std::cerr << e.what() << std::endl;
failures = true;
}
}
}
catch (std::exception const &e)
{
std::cerr << e.what() << std::endl;
return 2;
}
return failures;
}