Wrapper for PostgreSQL commands