Opened 6 years ago

Closed 4 years ago

#14898 closed Cleanup/optimization (wontfix)

Move validate_sql functionality into backend

Reported by: Christophe Pettus Owned by: nobody
Component: Database layer (models, ORM) Version: 1.3-alpha
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Right now, RawQuery.validate_sql does one thing: It statically checks to see if the query begins with "SELECT". In the case of some backends (such as PostgreSQL), other statements can return sets, like FETCH (from a cursor) and DO. It would be great to use those in raw queries as well. Rather than just building up a large list in the function, I suggest that the list be moved into the backend, or the actual guts of validate_sql be delegated to it.

Change History (5)

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

Triage Stage: UnreviewedAccepted

comment:2 Changed 6 years ago by James Addison

Severity: Normal
Type: Cleanup/optimization

comment:3 Changed 5 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:4 Changed 5 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:5 Changed 4 years ago by Claude Paroz

Resolution: wontfix
Status: newclosed

There is no more validation on raw sql (see #14733).

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