Your current user on Windows doesn’t let you perform a PostgreSQL’s command?
Some PostgreSQL commands like createdb, pg_restore, etc. works assuming the current user logged on the console (or system).
This approach makes simple things;
Unfortunately, many times, the current user doesn’t exist on the database, mainly when restoring legacy databases.
On *Nix environment, it is used sudo command to become a postgres user.
On Windows, better than trying to do this running runas command is to create the Windows’ current user on the database.
Then, you first create the user then run the cmd.
It is an easier approach.
Note: the user must be created with privileges to create tables.
Follow the commands:
createuser -U postgres -W -e -l -r -s alsdias
psql -Upostgres -W
\password alsdias
pass:postgres
psql -Upostgres -d getit < L:\work\dev\devdb\generic\tests\testone\testone_pg\dump\pg_vmvd7b_getit_151213.dump
psql -Upostgres -W
\password alsdias
pass:postgres
psql -Upostgres -d getit < L:\work\dev\devdb\generic\tests\testone\testone_pg\dump\pg_vmvd7b_getit_151213.dump
Brazilian system analyst graduated by UNESA (University Estácio de Sá – Rio de Janeiro). Geek by heart.