aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-07-24 19:30:52 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-07-24 19:30:52 +0200
commit4b885cb847c54a67aab15df97794f13d66157133 (patch)
tree00700880f8c98de94d5784c56e19640b48ee793a
parentd8d71b6838bd3e5268668fb459d89e1666111a87 (diff)
Never generate zero length oid arrays for PostgreSQL
VC++ does not allow zero length array initialization, nor for const values to remain uninitialized.
-rw-r--r--odb/relational/pgsql/source.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/odb/relational/pgsql/source.cxx b/odb/relational/pgsql/source.cxx
index 7d60ec8..83aa8c4 100644
--- a/odb/relational/pgsql/source.cxx
+++ b/odb/relational/pgsql/source.cxx
@@ -1078,7 +1078,13 @@ namespace relational
}
else
os << oids[column_sql_type (m, "value").type];
+
}
+ else
+ // MSVC does not allow zero length arrays or uninitialized
+ // non-extern const values.
+ //
+ os << "0";
os << "};";
}
@@ -1092,6 +1098,8 @@ namespace relational
if (!inv)
os << id_oid;
+ else
+ os << "0";
os << "};";
}