Updates for working with pgsql and sequences