Opened 8 years ago

Closed 8 years ago

#10161 closed (fixed)

Fix F expressions with Oracle

Reported by: Ian Kelly Owned by: Ian Kelly
Component: Database layer (models, ORM) Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Attachments (2)

10161-r9848.diff (5.1 KB) - added by Russell Keith-Magee 8 years ago.
First cut at a patch to fix Oracle expression problems
10161-r9888.diff (5.7 KB) - added by Ian Kelly 8 years ago.
Went ahead and added a NotImplementedError for '|'

Download all attachments as: .zip

Change History (6)

Changed 8 years ago by Russell Keith-Magee

Attachment: 10161-r9848.diff added

First cut at a patch to fix Oracle expression problems

comment:1 Changed 8 years ago by Russell Keith-Magee

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

Ian - I'm pretty sure this will fix the Oracle problems; if you can confirm that the expression tests pass with this patch, I'll commit it.

comment:2 Changed 8 years ago by Ian Kelly

Has patch: set

I had to make a few minor changes to get it to work, so I uploaded a new patch with those changes. All the expressions and expressions_regress tests pass.

I think we should also smack the user with a more useful error message if they try to use bit-wise or in Oracle. The current error message is rather confusing: DatabaseError: ORA-00996: the concatenate operator is ||, not |.

Changed 8 years ago by Ian Kelly

Attachment: 10161-r9888.diff added

Went ahead and added a NotImplementedError for '|'

comment:3 Changed 8 years ago by Alex Gaynor

IMO it should just handle | using the fancy bit arithmatic you mentioned, it's minimal overhead(or more accurately it's only overhead if you are using oracle and the | operator) but it just adds to the flexibility.

comment:4 Changed 8 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

(In [9898]) Fixed #10161 -- Modified evaluation of query expressions to allow for operators that take the form of functions. This is mostly for the benefit of Oracle, but it should prove useful later on. Thanks to Ian for the report and feedback on the fix.

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