integers passed in as params to SQL statements should be cast with (int) to keep Postgres happy.