Added a method and validation for PostgreSQL 8.* compatibility

Added a method and validation for PostgreSQL 8.* compatibility using the same fields and values from the last insert as filters. PostgreSQL 8.* doesn't have a RETURNING keyword.
The validation checks the current server version so we can skip this fix if we're using PostgreSQL 9+.