Fix regression in postgres module.

Closes #9372