Re: [GENERAL] strange message from pg_dumpall

2007-10-31 Thread Tom Lane
Joao Miguel Ferreira <[EMAIL PROTECTED]> writes: > This is what I do: > system("su postgres -c \"pg_dumpall --clean > some_file\""); > this is run from within a Perl module called from within a Perl script. > I've tried the same command directlly on the shell and it works fine. > But from the pe

Re: [GENERAL] strange message from pg_dumpall

2007-10-31 Thread Thomas Pundt
On Mittwoch, 31. Oktober 2007, Joao Miguel Ferreira wrote: | I got surprised by this message: | | - | The program "pg_dump" is needed by pg_dumpall but was not found in the | same directory as "/usr/bin/pg_dumpall". | Check your installation. | --

Re: [GENERAL] strange message from pg_dumpall

2007-10-31 Thread Joao Miguel Ferreira
> | system("su postgres -c \"pg_dumpall --clean > some_file\""); > > I'd try "su - postgres ..."; this will use postgres' environment here. > That was a good one but still didn't work > | this is run from within a Perl module called from within a Perl script. > | > | I've tried the same

Re: [GENERAL] strange message from pg_dumpall

2007-10-31 Thread Tom Lane
Joao Miguel Ferreira <[EMAIL PROTECTED]> writes: > This is what I do: > system("su postgres -c \"pg_dumpall --clean > some_file\""); This is going to try to find pg_dumpall in whatever PATH is currently active within the script --- maybe there's something bogus about that path? Personally I'd use

Re: [GENERAL] strange message from pg_dumpall

2007-10-31 Thread T.J. Adami
On 31 out, 06:56, [EMAIL PROTECTED] (Joao Miguel Ferreira) wrote: > Hello all, > > I got surprised by this message: > > - > The program "pg_dump" is needed by pg_dumpall but was not found in the > same directory as "/usr/bin/pg_dumpall". > Check your installation