aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-07-27 16:04:11 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-07-27 16:04:11 +0200
commit91d65246a090f2c661f4670200595b03b6d63a0d (patch)
tree80f5cc0696fa12aed636dadff4feb0878c9435a9
parentc7690dd7afac4711466851bc493825d713479de0 (diff)
Handle special case of array of zero elements
-rw-r--r--odb/pgsql/simple-object-statements.hxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/odb/pgsql/simple-object-statements.hxx b/odb/pgsql/simple-object-statements.hxx
index d3938f4..57cf685 100644
--- a/odb/pgsql/simple-object-statements.hxx
+++ b/odb/pgsql/simple-object-statements.hxx
@@ -486,11 +486,15 @@ namespace odb
//
std::size_t insert_image_version_;
binding insert_image_binding_;
- bind insert_image_bind_[insert_column_count];
+ bind insert_image_bind_[
+ insert_column_count != 0 ? insert_column_count : 1];
native_binding insert_image_native_binding_;
- char* insert_image_values_[insert_column_count];
- int insert_image_lengths_[insert_column_count];
- int insert_image_formats_[insert_column_count];
+ char* insert_image_values_[
+ insert_column_count != 0 ? insert_column_count : 1];
+ int insert_image_lengths_[
+ insert_column_count != 0 ? insert_column_count : 1];
+ int insert_image_formats_[
+ insert_column_count != 0 ? insert_column_count : 1];
// Update binding. Note that the id suffix is bound to id_image_
// below instead of image_ which makes this binding effectively