What fixed it for me, using pgAdmin PSQL tool on Windows was to ensure that forward slashes / are used instead of backslashes \, this command works:
\i C:/Users/Public/Documents/db.sql