956266 - Fixing bad content views SQL statement

Fixing SQL statement in content views that works in PostgreSQL 9.1+ but not in
PostgreSQL 9.0 and Postgres 8.x.