SQL adaptation guide for PostgreSQL 9.x