Fix #1382 PostgreSQL rand() function needs to be random()

Fix #1382 PostgreSQL rand() function needs to be random()