extend wait and modify commands for postgresql 9.3