|
@@ -13,8 +13,11 @@
|
|
*
|
|
*
|
|
*****************************************************************************/
|
|
*****************************************************************************/
|
|
#include <stdlib.h>
|
|
#include <stdlib.h>
|
|
|
|
+
|
|
#include <grass/dbmi.h>
|
|
#include <grass/dbmi.h>
|
|
#include <grass/gis.h>
|
|
#include <grass/gis.h>
|
|
|
|
+#include <grass/glocale.h>
|
|
|
|
+
|
|
#include "globals.h"
|
|
#include "globals.h"
|
|
#include "proto.h"
|
|
#include "proto.h"
|
|
|
|
|
|
@@ -38,7 +41,7 @@ int db__driver_execute_immediate(dbString * sql)
|
|
res = PQexec(pg_conn, str);
|
|
res = PQexec(pg_conn, str);
|
|
|
|
|
|
if (!res || PQresultStatus(res) != PGRES_COMMAND_OK) {
|
|
if (!res || PQresultStatus(res) != PGRES_COMMAND_OK) {
|
|
- append_error("Cannot execute: \n");
|
|
|
|
|
|
+ append_error(_("Unable to execute:\n"));
|
|
append_error(str);
|
|
append_error(str);
|
|
append_error("\n");
|
|
append_error("\n");
|
|
append_error(PQerrorMessage(pg_conn));
|
|
append_error(PQerrorMessage(pg_conn));
|
|
@@ -66,7 +69,7 @@ int db__driver_begin_transaction(void)
|
|
res = PQexec(pg_conn, "BEGIN");
|
|
res = PQexec(pg_conn, "BEGIN");
|
|
|
|
|
|
if (!res || PQresultStatus(res) != PGRES_COMMAND_OK) {
|
|
if (!res || PQresultStatus(res) != PGRES_COMMAND_OK) {
|
|
- append_error("Cannot 'BEGIN' transaction");
|
|
|
|
|
|
+ append_error(_("Unable to 'BEGIN' transaction"));
|
|
report_error();
|
|
report_error();
|
|
PQclear(res);
|
|
PQclear(res);
|
|
return DB_FAILED;
|
|
return DB_FAILED;
|
|
@@ -87,7 +90,7 @@ int db__driver_commit_transaction(void)
|
|
res = PQexec(pg_conn, "COMMIT");
|
|
res = PQexec(pg_conn, "COMMIT");
|
|
|
|
|
|
if (!res || PQresultStatus(res) != PGRES_COMMAND_OK) {
|
|
if (!res || PQresultStatus(res) != PGRES_COMMAND_OK) {
|
|
- append_error("Cannot 'COMMIT' transaction");
|
|
|
|
|
|
+ append_error(_("Unable to 'COMMIT' transaction"));
|
|
report_error();
|
|
report_error();
|
|
PQclear(res);
|
|
PQclear(res);
|
|
return DB_FAILED;
|
|
return DB_FAILED;
|