Port changes from parent ticket to pgsql.inc.

Comments

Liam Morland created an issue.