Index: doc/src/sgml/keywords.sgml =================================================================== RCS file: /home/omar/cvs/cvs/pgsql/doc/src/sgml/keywords.sgml,v retrieving revision 2.15 diff -C6 -r2.15 keywords.sgml *** doc/src/sgml/keywords.sgml 27 Nov 2004 21:27:06 -0000 2.15 --- doc/src/sgml/keywords.sgml 30 Jul 2005 06:37:02 -0000 *************** *** 3234,3245 **** --- 3234,3252 ---- non-reserved non-reserved non-reserved + RETURNING + reserved + + + + + RETURNS non-reserved reserved reserved Index: doc/src/sgml/ref/delete.sgml =================================================================== RCS file: /home/omar/cvs/cvs/pgsql/doc/src/sgml/ref/delete.sgml,v retrieving revision 1.24 diff -C6 -r1.24 delete.sgml *** doc/src/sgml/ref/delete.sgml 8 Apr 2005 00:59:58 -0000 1.24 --- doc/src/sgml/ref/delete.sgml 30 Jul 2005 06:37:02 -0000 *************** *** 20,31 **** --- 20,32 ---- DELETE FROM [ ONLY ] table [ USING usinglist ] [ WHERE condition ] + [ RETURNING expression [, ...] ] Description *************** *** 102,131 **** A value expression that returns a value of type boolean that determines the rows which are to be deleted. Outputs ! On successful completion, a DELETE command returns a command ! tag of the form DELETE count The count is the number of rows deleted. If count is 0, no rows matched the condition (this is not considered an error). Notes --- 103,155 ---- A value expression that returns a value of type boolean that determines the rows which are to be deleted. + + + + RETURNING + expression [, ...] + + + + An optional list of expressions to return. + + + Outputs ! On successful completion, a DELETE command without a ! RETURNING clause returns a command tag of the form DELETE count The count is the number of rows deleted. If count is 0, no rows matched the condition (this is not considered an error). + + + RETURNING + DELETE + + + + If a RETURNING clause is present, the expression + specified is evaluated for each deleted row and the result is + returned. + Notes *************** *** 158,183 **** DELETE FROM films WHERE kind <> 'Musical'; Clear the table films: DELETE FROM films; Compatibility This command conforms to the SQL standard, except that the ! USING clause and the ability to reference other tables ! in the WHERE clause are PostgreSQL extensions.