From 1f68dc4ad4ddc67831c6aa047683a5b53fa33a37 Mon Sep 17 00:00:00 2001 From: Ian Kelly Date: Wed, 1 Dec 2010 23:36:56 +0000 Subject: Fixed #11706: Added an Oracle connection option to disable the use of RETURNING INTO in INSERT statements. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14765 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/ref/databases.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'docs') diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt index 3aa78ef647..1406b7447e 100644 --- a/docs/ref/databases.txt +++ b/docs/ref/databases.txt @@ -585,6 +585,23 @@ your Oracle database configuration to True:: Failure to do this may result in crashes and other odd behavior. +INSERT ... RETURNING INTO +------------------------- + +By default, the Oracle backend uses a ``RETURNING INTO`` clause to efficiently +retrieve the value of an ``AutoField`` when inserting new rows. This behavior +may result in a ``DatabaseError`` in certain unusual setups, such as when +inserting into a remote table, or into a view with an ``INSTEAD OF`` trigger. +The ``RETURNING INTO`` clause can be disabled by setting the +``use_returning_into`` option of the database configuration to False:: + + 'OPTIONS': { + 'use_returning_into': False, + }, + +In this case, the Oracle backend will use a separate ``SELECT`` query to +retrieve AutoField values. + Tablespace options ------------------ -- cgit v1.3