Reputation: 510
I am currently working on a project in Delphi that uses Postgres as DataBase.
I am using pg_dump.exe to create a full backup. But I need to know the exact path of pg_dump.exe on target machines.
it can be on C:\prgram files\ or C:\program files (x86) . also any Other partition (d:,e:,...)
Putting a copy of pg-dump.exe in my application folder does not solve the problem.
UPDATE
searching the file by its name on all drives is not a good solution.
in this case, I must calculate the checksum of file for all versions of PostgreSQL.also for PG_restore
(If there is no other way, finally I will do that)
because
1-Their may be some copy of this file in the wrong paths. ( PG_DUMP.exe in a folder without dlls and it won't run. I checked it )
2-a user file with the same name can fool the program( even a copy of a worm or virus with the name of PG_DUMP.exe
3-People get backups on emergency situations. I think it is not so wise solution to search for a file in hundreds of thousands of files on user HDD
Upvotes: 4
Views: 16378
Reputation: 781
you should change path of pg_dump.exe
as following open pgadmin4 > file > preference> path > pinary bath and change path to bin
Upvotes: 4