[HACKERS] automatic password for pg_dump to be used for a batch file in vb6

2007-02-15 Thread oliver rombaoa
i want to add database backup to my program i developed in visual basic 6, of 
course i can save the syntax for pg_dump in a batch file and call it inside vb6 
via shell, but my problem is that the batch file executes but stops to prompt 
for a password. how can i supply a password to it automatically or i mean 
within visual basic 6 so that no user interaction is needed, i don't mind about 
the security since only the administrator has access for the program. please, 
any help will be greatly appreciated. thank you.

oliver
 
A man is what he is, not what he used to be





 

Looking for earth-friendly autos? 
Browse Top Cars by Green Rating at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [HACKERS] automatic password for pg_dump to be used for a batch file in vb6

2007-02-15 Thread Andrew Dunstan

oliver rombaoa wrote:

i want to add database backup to my program i developed in visual basic 6, of course i 
can save the syntax for pg_dump in a batch file and call it inside vb6 via 
shell, but my problem is that the batch file executes but stops to prompt for 
a password. how can i supply a password to it automatically or i mean within visual basic 
6 so that no user interaction is needed, i don't mind about the security since only the 
administrator has access for the program. please, any help will be greatly appreciated. 
thank you.

  


1. pgsql-hackers is not really the right list to ask this question. In 
future, please ask usage question on pgsql-general
2. have your vb program write out a pgpass file, if necessary also 
setting up the PGPASSFILE environment setting in the .bat file to point 
to it.
2-a. alternatively, use some auth method that does not require use of 
passwords.


cheers

andrew

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
  choose an index scan if your joining column's datatypes do not
  match


Re: [HACKERS] automatic password for pg_dump to be used for a batch file in vb6

2007-02-15 Thread Magnus Hagander
oliver rombaoa wrote:
 i want to add database backup to my program i developed in visual
 basic 6, of course i can save the syntax for pg_dump in a batch file
 and call it inside vb6 via shell, but my problem is that the batch
 file executes but stops to prompt for a password. how can i supply a
 password to it automatically or i mean within visual basic 6 so that
 no user interaction is needed, i don't mind about the security since
 only the administrator has access for the program. please, any help
 will be greatly appreciated. thank you.

Use the pgpass.conf file or the PGPASSWORD environment variable to
supply the password.

//Magnus

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [HACKERS] automatic password for pg_dump to be used for a batch file in vb6

2007-02-15 Thread Andrej Ricnik-Bay

Firstly, this is the wrong list;  this one is to discuss the development
OF postgres, NOT with.  You need novice or general.

Secondly: look for pgpass in the documentation

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings