Revision 3257
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
536 | 536 |
|
537 | 537 |
def is_explainable(query): |
538 | 538 |
# See <http://www.postgresql.org/docs/8.3/static/sql-explain.html#AEN57749> |
539 |
return re.match('^(?:SELECT|INSERT|UPDATE|DELETE|VALUES|EXECUTE|DECLARE)\b',
|
|
540 |
query) |
|
539 |
return re.match(r'^(?:SELECT|INSERT|UPDATE|DELETE|VALUES|EXECUTE|DECLARE)\b'
|
|
540 |
, query)
|
|
541 | 541 |
|
542 | 542 |
def explain(db, query): |
543 | 543 |
return strings.join_lines(values(run_query(db, 'EXPLAIN '+query, |
Also available in: Unified diff
sql.py: is_explainable(): Fixed bug where needed r'' syntax to escape \ in \b