Opened 17 years ago
Closed 17 years ago
#10161 closed (fixed)
Fix F expressions with Oracle
| Reported by: | Erin Kelly | Owned by: | Erin Kelly |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | dev |
| Severity: | Keywords: | ||
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
The %, &, and | operators don't work. See http://groups.google.com/group/django-developers/browse_thread/thread/4b6b987940ce16eb?hl=en
Attachments (2)
Change History (6)
by , 17 years ago
| Attachment: | 10161-r9848.diff added |
|---|
comment:1 by , 17 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
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 by , 17 years ago
| 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 |.
by , 17 years ago
| Attachment: | 10161-r9888.diff added |
|---|
Went ahead and added a NotImplementedError for '|'
comment:3 by , 17 years ago
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 by , 17 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
First cut at a patch to fix Oracle expression problems