added date_type_t, time_type_t and timestamp, ensure allocated postgres resources are released, split repository into basic_repository and repository.
This commit is contained in:
@@ -153,6 +153,8 @@ void postgres_result_reader::read_value( const char* /*id*/, const size_t index,
|
||||
unsigned char* unescaped = PQunescapeBytea(data, &length);
|
||||
|
||||
value.assign(unescaped, unescaped+length);
|
||||
|
||||
PQfreemem(unescaped);
|
||||
}
|
||||
|
||||
template <typename Type>
|
||||
@@ -168,6 +170,8 @@ void set_value<utils::blob>(const char* str, utils::value& value) {
|
||||
unsigned char* unescaped = PQunescapeBytea(reinterpret_cast<const unsigned char*>(str), &length);
|
||||
|
||||
value = utils::blob(unescaped, unescaped+length);
|
||||
|
||||
PQfreemem(unescaped);
|
||||
}
|
||||
|
||||
void postgres_result_reader::read_value(const char * /*id*/, const size_t index, utils::value &val, size_t) {
|
||||
|
||||
Reference in New Issue
Block a user