- changed status to resolved
Support for 'update .. returning ..' syntax
Issue #797
resolved
(original reporter: ants) PostgreSQL supports returning the changed rows from an update statement. The syntax is ''regular_update_clause + ' RETURNING ' + column_list'', where column_list has the exact same syntax as the one in a select clause.
To support this it would be necessary to: 1. Support adding a column list to an update clause by either adding it to a regular Update class or subclassing it for Postgres. 2. Make the compiler support it. 3. Make the ExecutionContext properly recognize it as a select. Changing the regexp to r'\s(?:SELECT|FETCH|UPDATE.RETURNING)' would work most of the time, but it should check that the RETURNING keyword isn't quoted.
Comments (1)
-
Account Deleted - Log in to comment
(original author: ants) Added together with insert support in e82ca71cc5c4175f071cdd72207ec04e58a6498c. Uses the postgres_returning kwarg.