Data select fails due to explicit casts required in Postgres > 8.3
Error dump:
!!! Caught Server Exception
HTTP CODE: 500
Taps Server Error: PG::UndefinedFunction: ERROR: operator does not exist: character varying > integer
LINE 1: SELECT * FROM "search_index" WHERE ("word" > 0) ORDER BY "wo...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
["/Library/Ruby/Gems/2.0.0/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:175:in async_exec'", "/Library/Ruby/Gems/2.0.0/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:175:in block (2 levels) in execute'", "/Library/Ruby/Gems/2.0.0/gems/sequel-3.20.0/lib/sequel/database/logging.rb:28:in log_yield'", "/Library/Ruby/Gems/2.0.0/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:175:in block in execute'", "/Library/Ruby/Gems/2.0.0/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:158:in check_disconnect_errors'", "/Library/Ruby/Gems/2.0.0/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:175:in execute'", "/Library/Ruby/Gems/2.0.0/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:240:in block (2 levels) in execute'", "/Library/Ruby/Gems/2.0.0/gems/sequel-3.20.0/lib/sequel/connection_pool/threaded.rb:84:in hold'", "/Library/Ruby/Gems/2.0.0/gems/sequel-3.20.0/lib/sequel/database/connecting.rb:226:in synchronize'", "/Library/Ruby/Gems/2.0.0/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:240:in block in execute'", "/Library/Ruby/Gems/2.0.0/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:261:in check_database_errors'", "/Library/Ruby/Gems/2.0.0/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:238:in execute'", "/Library/Ruby/Gems/2.0.0/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:541:in execute'", "/Library/Ruby/Gems/2.0.0/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:319:in fetch_rows'", "/Library/Ruby/Gems/2.0.0/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:123:in each'", "/Library/Ruby/Gems/2.0.0/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:50:in all'", "/Library/Ruby/Gems/2.0.0/gems/taps-0.3.24/lib/taps/data_stream.rb:291:in block in load_buffer'", "/Library/Ruby/Gems/2.0.0/gems/taps-0.3.24/lib/taps/data_stream.rb:284:in loop'", "/Library/Ruby/Gems/2.0.0/gems/taps-0.3.24/lib/taps/data_stream.rb:284:in load_buffer'", "/Library/Ruby/Gems/2.0.0/gems/taps-0.3.24/lib/taps/data_stream.rb:304:in fetch_buffered'", "/Library/Ruby/Gems/2.0.0/gems/taps-0.3.24/lib/taps/data_stream.rb:320:in fetch_rows'", "/Library/Ruby/Gems/2.0.0/gems/taps-0.3.24/lib/taps/data_stream.rb:116:in fetch'", "/Library/Ruby/Gems/2.0.0/gems/taps-0.3.24/lib/taps/server.rb:181:in block (2 levels) in class:Server'", "/Library/Ruby/Gems/2.0.0/gems/taps-0.3.24/lib/taps/db_session.rb:15:in block in conn'", "/Library/Ruby/Gems/2.0.0/gems/sequel-3.20.0/lib/sequel/database/connecting.rb:76:in connect'", "/Library/Ruby/Gems/2.0.0/gems/sequel-3.20.0/lib/sequel/core.rb:119:in connect'", "/Library/Ruby/Gems/2.0.0/gems/taps-0.3.24/lib/taps/db_session.rb:14:in conn'", "/Library/Ruby/Gems/2.0.0/gems/taps-0.3.24/lib/taps/server.rb:178:in block in <class:Server>'", "/Library/Ruby/Gems/2.0.0/gems/sinatra-1.0/lib/sinatra/base.rb:865:in call'", "/Library/Ruby/Gems/2.0.0/gems/sinatra-1.0/lib/sinatra/base.rb:865:in block in route'", "/Library/Ruby/Gems/2.0.0/gems/sinatra-1.0/lib/sinatra/base.rb:521:in instance_eval'", "/Library/Ruby/Gems/2.0.0/gems/sinatra-1.0/lib/sinatra/base.rb:521:in route_eval'", "/Library/Ruby/Gems/2.0.0/gems/sinatra-1.0/lib/sinatra/base.rb:500:in block (2 levels) in route!'", "/Library/Ruby/Gems/2.0.0/gems/sinatra-1.0/lib/sinatra/base.rb:497:in catch'", "/Library/Ruby/Gems/2.0.0/gems/sinatra-1.0/lib/sinatra/base.rb:497:in block in route!'", "/Library/Ruby/Gems/2.0.0/gems/sinatra-1.0/lib/sinatra/base.rb:476:in each'", "/Library/Ruby/Gems/2.0.0/gems/sinatra-1.0/lib/sinatra/base.rb:476:in route!'", "/Library/Ruby/Gems/2.0.0/gems/sinatra-1.0/lib/sinatra/base.rb:601:in dispatch!'", "/Library/Ruby/Gems/2.0.0/gems/sinatra-1.0/lib/sinatra/base.rb:411:in block in call!'", "/Library/Ruby/Gems/2.0.0/gems/sinatra-1.0/lib/sinatra/base.rb:566:in instance_eval'", "/Library/Ruby/Gems/2.0.0/gems/sinatra-1.0/lib/sinatra/base.rb:566:in block in invoke'", "/Library/Ruby/Gems/2.0.0/gems/sinatra-1.0/lib/sinatra/base.rb:566:in catch'", "/Library/Ruby/Gems/2.0.0/gems/sinatra-1.0/lib/sinatra/base.rb:566:in invoke'", "/Library/Ruby/Gems/2.0.0/gems/sinatra-1.0/lib/sinatra/base.rb:411:in call!'", "/Library/Ruby/Gems/2.0.0/gems/sinatra-1.0/lib/sinatra/base.rb:399:in call'", "/Library/Ruby/Gems/2.0.0/gems/rack-1.0.1/lib/rack/deflater.rb:13:in call'", "/Library/Ruby/Gems/2.0.0/gems/rack-1.0.1/lib/rack/auth/basic.rb:25:in call'", "/Library/Ruby/Gems/2.0.0/gems/rack-1.0.1/lib/rack/commonlogger.rb:20:in _call'", "/Library/Ruby/Gems/2.0.0/gems/rack-1.0.1/lib/rack/commonlogger.rb:13:in call'", "/Library/Ruby/Gems/2.0.0/gems/sinatra-1.0/lib/sinatra/base.rb:979:in block in call'", "/Library/Ruby/Gems/2.0.0/gems/sinatra-1.0/lib/sinatra/base.rb:1005:in synchronize'", "/Library/Ruby/Gems/2.0.0/gems/sinatra-1.0/lib/sinatra/base.rb:979:in call'", "/Library/Ruby/Gems/2.0.0/gems/rack-1.0.1/lib/rack/content_length.rb:13:in call'", "/Library/Ruby/Gems/2.0.0/gems/rack-1.0.1/lib/rack/handler/webrick.rb:50:in service'", "/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/webrick/httpserver.rb:138:in service'", "/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/webrick/httpserver.rb:94:in run'", "/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/webrick/server.rb:295:in block in start_thread'"]`
More info: http://petereisentraut.blogspot.cz/2008/03/readding-implicit-casts-in-postgresql.html