From 4b885cb847c54a67aab15df97794f13d66157133 Mon Sep 17 00:00:00 2001 From: Constantin Michael Date: Sun, 24 Jul 2011 19:30:52 +0200 Subject: Never generate zero length oid arrays for PostgreSQL VC++ does not allow zero length array initialization, nor for const values to remain uninitialized. --- odb/relational/pgsql/source.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) 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 << "};"; } -- cgit v1.1