aboutsummaryrefslogtreecommitdiff
path: root/odb/pgsql/container-statements.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-10-28 11:18:54 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-10-28 11:18:54 +0200
commitf3e83073310e5fbafb142bb8d3cd1b03ed6088e9 (patch)
treeb5dff90ee11e188a32e15defcdd7e0caa846f48e /odb/pgsql/container-statements.hxx
parentc83c53f3cea54b62d1d90d298dccafcda37d5297 (diff)
Implement returning of auto id using RETURNING clause in PostgreSQL
Before we used a separate SELECT lastval() query which was both inefficient and error-prone in cases where INSERT may cause triggers to override the last value.
Diffstat (limited to 'odb/pgsql/container-statements.hxx')
-rw-r--r--odb/pgsql/container-statements.hxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/odb/pgsql/container-statements.hxx b/odb/pgsql/container-statements.hxx
index 252eb77..a8d15d8 100644
--- a/odb/pgsql/container-statements.hxx
+++ b/odb/pgsql/container-statements.hxx
@@ -187,7 +187,8 @@ namespace odb
insert_one_types_,
insert_one_count_,
data_image_binding_,
- data_image_native_binding_));
+ data_image_native_binding_,
+ false));
}
return *insert_one_;