Fixes #1175 Added PgSQL part
Fixes #11475 Remove duplicated line
Merge pull request #1179 from JN-Jones/fix-1175

Fix 1175