diff options
-rw-r--r-- | odb/relational/pgsql/source.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/odb/relational/pgsql/source.cxx b/odb/relational/pgsql/source.cxx index c1ca854..d4c67d3 100644 --- a/odb/relational/pgsql/source.cxx +++ b/odb/relational/pgsql/source.cxx @@ -718,6 +718,13 @@ namespace relational statement_oids st (statement_insert); st.traverse (c); + // Empty array are not portable. So add a dummy member if we + // are not sending anything with the insert statement. + // + if (cc.total == cc.inverse + cc.optimistic_managed + + (id != 0 && !poly_derived && auto_ (*id) ? cc.id : 0)) + os << "0"; + os << "};"; } |