Thread: about Command Prompt.
what i want is using the psql to excute a serial SQL command like create table in a file.
but i have tried " runas /noprofile /env /user:postgres "f:\postgre\bin\psql -f filename" "in Windows cmd ,it doesn't work.
Is there any way to do this or
How can I make my order work just like in Command Prompt?
but i have tried " runas /noprofile /env /user:postgres "f:\postgre\bin\psql -f filename" "in Windows cmd ,it doesn't work.
Is there any way to do this or
How can I make my order work just like in Command Prompt?
Hi. runas is not required. for example) C:\Program Files\PostgreSQL\8.3-beta1\bin>psql -f filename.sql postgres postgres Password for user postgres:**** pleae see. psql --help Regards, Hiroshi Saito ----- Original Message ----- From: longlong To: pgsql-general@postgresql.org Sent: Tuesday, October 09, 2007 9:25 PM Subject: [GENERAL]about Command Prompt. what i want is using the psql to excute a serial SQL command like create table in a file. but i have tried " runas /noprofile /env /user:postgres "f:\postgre\bin\psql -f filename" "in Windows cmd ,it doesn't work. Is there any way to do this or How can I make my order work just like in Command Prompt?
Hi. ----- Original Message ----- From: longlong > if it is not in Command Prompt how can i work in a .bat file like that. > and i don't want the user input password,no interaction. Ahh, Ok. Please see. http://developer.postgresql.org/pgdocs/postgres/libpq-pgpass.html notepad "%APPDATA%\postgresql\pgpass.conf" --edit-sample-- *:5433:postgres:postgres:postgres It follows. This is not request password. C:\Program Files\PostgreSQL\8.3-beta1\bin>psql postgres postgres Welcome to psql 8.3beta1, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminate with semicolon to execute query \q to quit postgres=# \q I want this to help you.:-) Regards, Hiroshi Saito
----- Original Message ----- From: longlong > thanks ! :-) P.S) GUI edit can do pgpass.conf in pgAdminIII. Please use it.! Regards, Hiroshi Saito 2007/10/10, Hiroshi Saito <z-saito@guitar.ocn.ne.jp>: Hi. ----- Original Message ----- From: longlong > if it is not in Command Prompt how can i work in a .bat file like that. > and i don't want the user input password,no interaction. Ahh, Ok. Please see. http://developer.postgresql.org/pgdocs/postgres/libpq-pgpass.html notepad "%APPDATA%\postgresql\pgpass.conf" --edit-sample-- *:5433:postgres:postgres:postgres It follows. This is not request password. C:\Program Files\PostgreSQL\8.3-beta1\bin>psql postgres postgres Welcome to psql 8.3beta1, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminate with semicolon to execute query \q to quit postgres=# \q I want this to help you.:-) Regards, Hiroshi Saito