aboutsummaryrefslogtreecommitdiff
path: root/odb/pgsql/statement.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/pgsql/statement.cxx')
-rw-r--r--odb/pgsql/statement.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/odb/pgsql/statement.cxx b/odb/pgsql/statement.cxx
index c839e92..671bf61 100644
--- a/odb/pgsql/statement.cxx
+++ b/odb/pgsql/statement.cxx
@@ -180,6 +180,11 @@ namespace odb
bool r (true);
int int_row (static_cast<int> (row));
+ // Make sure that the number of columns in the result returned by
+ // the database matches the number that we expect. A common cause
+ // of this assertion is a native view with a number of data members
+ // not matching the number of columns in the SELECT-list.
+ //
assert (static_cast<size_t> (PQnfields (result)) == count);
for (int i (0); i < static_cast<int> (count); ++i)