rand() to random()
Merge branch 'pgsql-fixes' into feature