#839: Use explicit typecast in PostgreSQL adapter.