Updating for postgres compatibility