Joined September 2012

Jake Moffatt

Programmer at Apartment List
Apartment List

Posted to Postgres, Rails, and Regex's over 1 year ago

you can also use a partial index in postres to optimize this query:

create index concurrently integer_responses on responses ((value ~ '^\d+$'));

and don't forget the opposite case as well:

create index concurrently string_responses on responses ((value !~ '^\d+$'));

Then when you execute the query/scope you will still benefit from an index.

Posted to One line browser notepad over 1 year ago

I made a version that is a full blown Ruby editor with syntax highlighting from Ace.

164 Karma
1,679 Total ProTip Views