Skip to main content
  1. About
  2. Stack Internal
The 2026 Annual Developer Survey is live— take the Survey today!

Return to Question

Post Timeline

Notice removed Draw attention by Community Bot
Bounty Ended with raviolicode's answer chosen by Community Bot
Notice added Draw attention by Neil Aggarwal
Bounty Started worth 50 reputation by Neil Aggarwal
Source Link
user3684014
  • reputation score 1205
  • 14 silver badges
  • 29 bronze badges

Push local PostgreSQL database to remote Heroku server

On windows 7, I want to push my local PostgreSQL database(9.4.0) to remote PostgreSQL server on Heroku(9.3.3), I followed the [Heroku PostgreSQL Document][1] to push:

>heroku pg:push postgres HEROKU_POSTGRESQL_NAVY_URL --app salty-atoll-4222
Your version of git is 1.9.5.. Which has serious security vulnerabilities.
More information here: https://blog.heroku.com/archives/2014/12/23/update_your_git_clients_on_windows_and_os_x
'env' is not recognized as an internal or external command,
operable program or batch file.
Password:
 ! WARNING: Extensions in newly created target database differ from existing source database.
 !
 ! Target extensions:
 ! extname
 ! ---------
 ! plpgsql
 ! (1 row)
 !
 !
 ! Source extensions:
 ! extname
 ! -----------
 ! adminpack
 ! plpgsql
 ! (2 rows)
 !
 !
 ! HINT: You should review output to ensure that any errors
 ! ignored are acceptable - entire tables may have been missed, where a dependency
 ! could not be resolved. You may need to to install a postgresql-contrib package
 ! and retry.

My local database server URL is localhost:5432. Both the username and database name are postgres, and I've add PGUSER and PGPASSWORD to my system variable, also, my DATABASE_URL system variable is postgres://postgres:password@localhost:5432/postgres.

Also, since it says 'env' is not recognized as an internal or external command, operable program or batch file., I guess set command can be use to replace env, so I also added a alias env.bat in C:\Windows\System32\env.bat:

@ECHO OFF
set

But it still can't recognized env command and my PGPASSWORD variable, asks me to type my password by hand, shows the same warning and my database can't be pushed to this remote server. What's the problem here? [1]: https://devcenter.heroku.com/articles/heroku-postgresql#pg-psql

lang-sql

AltStyle によって変換されたページ (->オリジナル) /