realestate-com-au/newrelic-sequel — pull request #1 by JonathanTron (2012-11-02 13:37:09+00:00)
Title: Add support to track queries using "WITH [RECURSIVE]"

Hi guys,

first of all, thanks for extracting the newrelic's sequel support in a Gem. I'm using with some complex queries, one of them being a recursive CTE (Postgresql) and found it not to be tracked.

This patch add tracking for CTE syntax (http://www.postgresql.org/docs/9.2/static/queries-with.html) both simple and recursive one. But don't try to find if it's used to SELECT/UPDATE/DELETE rows, because this would need far more than a simple regexp, so it tracks then as SELECT.