aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-07-12 15:24:25 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-07-12 15:25:52 +0200
commit05c106fa3f7fbb66b9cb6209bf76479ba6a5f21e (patch)
tree7ce8aba7ac91d2958b6b19d555ca620a1742a448
parent49a74130016351847f9b4a86d8a079ad7307f369 (diff)
Lengthen PostgreSQL BIT image buffer to allow for length specifier
-rw-r--r--odb/relational/pgsql/header.cxx6
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;"