Fixed issue #7831: SQL error while installation and using Postgres