Skip to content

Commit 8b263e4

Browse files
committed
db_manager versioning: add RETURNING to INSERT rule (fixes #16083)
(cherry picked from commit 3f7f95e)
1 parent fd7b52d commit 8b263e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/plugins/db_manager/db_plugins/postgis/plugins/versioning/dlg_versioning.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def sql_updatesView(self):
254254
CREATE OR REPLACE RULE "_DELETE" AS ON DELETE TO %(view)s DO INSTEAD
255255
DELETE FROM %(schematable)s WHERE %(origpkey)s = old.%(origpkey)s;
256256
CREATE OR REPLACE RULE "_INSERT" AS ON INSERT TO %(view)s DO INSTEAD
257-
INSERT INTO %(schematable)s (%(cols)s) VALUES (%(newcols)s);
257+
INSERT INTO %(schematable)s (%(cols)s) VALUES (%(newcols)s) RETURNING %(cols)s;
258258
CREATE OR REPLACE RULE "_UPDATE" AS ON UPDATE TO %(view)s DO INSTEAD
259259
UPDATE %(schematable)s SET %(assign)s WHERE %(origpkey)s = NEW.%(origpkey)s;""" % {'view': self.view,
260260
'schematable': self.schematable,

0 commit comments

Comments
 (0)