removing pg_query weirdness