I was diving into a really long request to one of my Rails applications using NewRelic and found a number of SQL queries that appear entirely foreign that are taking up a signif
These queries are used to get the "definition" of your tables and fields and are probably used by the framework to you're using to automatically generate models and/or validation rules in Ruby. (E.g. "Introspection")
I do not have experience with Ruby and the framework you're using, but I don't expect these queries to originate from SQL injection.
You can run the queries yourself in pgAdmin or psql to show the results they're producing and get an idea what information they get from the database