1 After a sql error, the error message that is printed
2 is incorrect and does not include the postgresql error message.
5 This patch applies to Bacula version 2.2.5 (and previous versions),
6 and can be applied with the following:
9 patch -p0 <2.2.5-postgresql-errors.patch
10 ./configure (your options)
16 Index: src/cats/cats.h
17 ===================================================================
18 --- src/cats/cats.h (révision 5763)
19 +++ src/cats/cats.h (copie de travail)
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)))