Opened 6 years ago

Closed 5 years ago

Last modified 4 years ago

#11706 closed (fixed)

Use of RETURNING should be optional

Reported by: mboersma Owned by: nobody
Component: Database layer (models, ORM) Version: 1.1
Severity: Keywords: Oracle oracle RETURNING
Cc: ikelly Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by mboersma)

See closed ticket #10473. The "RETURNING...INTO" SQL construct is supported in Oracle versions 9i and later, but with some significant restrictions:

Oracle Error :: ORA-22816
unsupported feature with RETURNING clause

Cause
RETURNING clause is currently not supported for object type
columns, LONG columns, remote tables, INSERT with subquery, and
INSTEAD OF Triggers.

Action
Use separate select statement to get the values.

The use of RETURNING INTO isn't mandatory, so perhaps we could refactor it so a settings.py option turns it off. Our use case is an in-house application that has several INSTEAD OF triggers.

Change History (7)

comment:1 Changed 6 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 6 years ago by mtredinnick

Agree that it would be nice to keep supporting 9i. Given that we already do some version-specific mods for Oracle (regex_lookup_*), it'd be nice to do the same thing for "RETURNING INTO".

comment:3 Changed 6 years ago by mboersma

  • Description modified (diff)
  • Summary changed from Use of RETURNING means Oracle 9i is no longer supported to Use of RETURNING should be optional

comment:4 Changed 6 years ago by mboersma

  • Description modified (diff)

comment:5 Changed 5 years ago by russellm

  • milestone changed from 1.2 to 1.3

Not critical for 1.2

comment:6 Changed 5 years ago by ikelly

  • Resolution set to fixed
  • Status changed from new to closed

(In [14765]) Fixed #11706: Added an Oracle connection option to disable the use of RETURNING INTO in INSERT statements.

comment:7 Changed 4 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top