lib/pghero/methods/suggested_indexes.rb in pghero-1.3.1 vs lib/pghero/methods/suggested_indexes.rb in pghero-1.3.2
- old
+ new
@@ -183,9 +183,11 @@
indexes
end
def best_index_structure(statement)
+ return {error: "Too large"} if statement.to_s.length > 10000
+
begin
tree = PgQuery.parse(statement).parsetree
rescue PgQuery::ParseError
return {error: "Parse error"}
end