Update gpgsql queries

fixes #927