61 *own_transaction =
false;
65 pg_log_error(
"%s: not connected to a database", operation);
78 *own_transaction =
true;
84 pg_log_error(
"%s: current transaction is aborted", operation);
87 pg_log_error(
"%s: unknown transaction status", operation);
145 bool own_transaction;
181 bool own_transaction;
201 size_t slen = strlen(comment_arg);
206 sprintf(cmdbuf,
"COMMENT ON LARGE OBJECT %u IS '", loid);
207 bufptr = cmdbuf + strlen(cmdbuf);
243 bool own_transaction;
PGresult * PSQLexec(const char *query)
#define pg_attribute_printf(f, a)
void ResetCancelConn(void)
void SetCancelConn(PGconn *conn)
static void PGresult * res
PGTransactionStatusType PQtransactionStatus(const PGconn *conn)
char * PQerrorMessage(const PGconn *conn)
size_t PQescapeStringConn(PGconn *conn, char *to, const char *from, size_t length, int *error)
int lo_unlink(PGconn *conn, Oid lobjId)
Oid lo_import(PGconn *conn, const char *filename)
int lo_export(PGconn *conn, Oid lobjId, const char *filename)
void * pg_malloc_extended(size_t size, int flags)
#define MCXT_ALLOC_NO_OOM
static bool start_lo_xact(const char *operation, bool *own_transaction)
bool do_lo_export(const char *loid_arg, const char *filename_arg)
static bool fail_lo_xact(const char *operation, bool own_transaction)
static void print_lo_result(const char *fmt,...) pg_attribute_printf(1
static bool finish_lo_xact(const char *operation, bool own_transaction)
bool do_lo_import(const char *filename_arg, const char *comment_arg)
bool do_lo_unlink(const char *loid_arg)
static void const char * fmt
vfprintf(stderr, fmt, args)
#define pg_log_error(...)
bool SetVariable(VariableSpace space, const char *name, const char *value)