]> git.sur5r.net Git - bacula/bacula/blob - bacula/patches/2.2.x/2.2.5-postgresql-errors.patch
ebl Add patch to allow a more easy selection for restore
[bacula/bacula] / bacula / patches / 2.2.x / 2.2.5-postgresql-errors.patch
1   After a sql error, the error message that is printed 
2   is incorrect and does not include the postgresql error message.  
3   It fixes #989
4
5   This patch applies to Bacula version 2.2.5 (and previous versions),
6   and can be applied with the following:
7
8   cd <bacula-source>
9   patch -p0 <2.2.5-postgresql-errors.patch
10   ./configure (your options)
11   make
12   ...
13   make install
14
15
16 Index: src/cats/cats.h
17 ===================================================================
18 --- src/cats/cats.h     (rĂ©vision 5763)
19 +++ src/cats/cats.h     (copie de travail)
20 @@ -498,7 +498,7 @@
21  #define sql_fetch_row(x)      my_postgresql_fetch_row(x)
22  #define sql_query(x, y)       my_postgresql_query((x), (y))
23  #define sql_close(x)          PQfinish((x)->db)
24 -#define sql_strerror(x)       PQresultErrorMessage((x)->result)
25 +#define sql_strerror(x)       PQerrorMessage((x)->db)
26  #define sql_num_rows(x)       ((unsigned) PQntuples((x)->result))
27  #define sql_data_seek(x, i)   my_postgresql_data_seek((x), (i))
28  #define sql_affected_rows(x)  ((unsigned) atoi(PQcmdTuples((x)->result)))