Re: [GENERAL] Finding the bin path

2009-12-27 Thread Craig Ringer
On 27/12/2009 2:12 PM, Rob Jaeger wrote: I was not clear in my initial question. I need to access the pg_dump.exe and pg_restore.exe files from within a c++ program. I can't execute pg_config.exe because it's in that bin that I'm seeking. I don't quite follow Greg Smith's reply of 'try guess bas

Re: [GENERAL] Finding the bin path

2009-12-27 Thread Craig Ringer
On 27/12/2009 2:12 PM, Rob Jaeger wrote: I don't quite follow Greg Smith's reply of 'try guess based on "which postmaster"' (can you clarify?) He's talking about UNIX systems. This will not help you. But - I think I have found what I need! I can do a "SHOW data_directory;" and then from ther

Re: [GENERAL] Finding the bin path

2009-12-27 Thread John R Pierce
Rob Jaeger wrote: I was not clear in my initial question. I need to access the pg_dump.exe and pg_restore.exe files from within a c++ program. I can't execute pg_config.exe because it's in that bin that I'm seeking. I don't quite follow Greg Smith's reply of 'try guess based on "which postmas

Re: [GENERAL] Finding the bin path

2009-12-27 Thread Rob Jaeger
I was not clear in my initial question. I need to access the pg_dump.exe and pg_restore.exe files from within a c++ program. I can't execute pg_config.exe because it's in that bin that I'm seeking. I don't quite follow Greg Smith's reply of 'try guess based on "which postmaster"' (can you clarify?

Re: [GENERAL] Finding the bin path

2009-12-26 Thread John R Pierce
Greg Smith wrote: I'm not sure which question Rob meant to ask here: 1) Where can I find the PostgreSQL in my PATH right now? The best I think you can do here is to try the above pg_config bit first, then if it doesn't work try guess based on "which postmaster". 2) Given a running server, w

Re: [GENERAL] Finding the bin path

2009-12-26 Thread Greg Smith
Tom Lane wrote: Rob Jaeger writes: Is there a command or reliable method of finding the location of the PostgreSQL bin path? pg_config --bindir Although I think not all packagers install this in the base package, which might limit its usefulness. I'm not sure which question Rob m

Re: [GENERAL] Finding the bin path

2009-12-25 Thread Tom Lane
Rob Jaeger writes: > Is there a command or reliable method of finding the location of the > PostgreSQL bin path? pg_config --bindir Although I think not all packagers install this in the base package, which might limit its usefulness. regards, tom lane -- Sent via pgsq

Re: [GENERAL] Finding the bin path

2009-12-25 Thread Guillaume Lelarge
Le 25/12/2009 18:02, Rob Jaeger a écrit : > Is there a command or reliable method of finding the location of the > PostgreSQL bin path? > Nope. > I'm currently using "SHOW hba_file;" which gives me the data path. For > default installs I can find the bin relative to this, but it fails under > cu

Re: [GENERAL] Finding the bin path

2009-12-25 Thread John R Pierce
Rob Jaeger wrote: Is there a command or reliable method of finding the location of the PostgreSQL bin path? I'm currently using "SHOW hba_file;" which gives me the data path. For default installs I can find the bin relative to this, but it fails under custom installs. My apologies if this h

[GENERAL] Finding the bin path

2009-12-25 Thread Rob Jaeger
Is there a command or reliable method of finding the location of the PostgreSQL bin path? I'm currently using "SHOW hba_file;" which gives me the data path. For default installs I can find the bin relative to this, but it fails under custom installs. My apologies if this has been addressed before