[postgresql] How do I convert an integer to string as part of a PostgreSQL query?