diff options
author | Constantin Michael <constantin@codesynthesis.com> | 2011-07-12 15:24:25 +0200 |
---|---|---|
committer | Constantin Michael <constantin@codesynthesis.com> | 2011-07-12 15:25:52 +0200 |
commit | 05c106fa3f7fbb66b9cb6209bf76479ba6a5f21e (patch) | |
tree | 7ce8aba7ac91d2958b6b19d555ca620a1742a448 | |
parent | 49a74130016351847f9b4a86d8a079ad7307f369 (diff) |
Lengthen PostgreSQL BIT image buffer to allow for length specifier
-rw-r--r-- | odb/relational/pgsql/header.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/odb/relational/pgsql/header.cxx b/odb/relational/pgsql/header.cxx index e8207aa..391b0a3 100644 --- a/odb/relational/pgsql/header.cxx +++ b/odb/relational/pgsql/header.cxx @@ -162,7 +162,11 @@ namespace relational virtual void traverse_bit (member_info& mi) { - unsigned int n (mi.st->range / 8 + (mi.st->range % 8 ? 1 : 0)); + // @@ Additional 4 bytes at the beginning of the array specify + // the number of significant bits in the image. This number + // is stored in network byte order. + // + unsigned int n (4 + mi.st->range / 8 + (mi.st->range % 8 ? 1 : 0)); os << "unsigned char " << mi.var << "value[" << n << "];" << "std::size_t " << mi.var << "size;" |