BUG #8472: could not find a \"%s\" to execute. When Directory On %PATH% Has Double Quotes.

From: goncons(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #8472: could not find a \"%s\" to execute. When Directory On %PATH% Has Double Quotes.
Date: 2013-09-26 22:16:21
Message-ID: E1VPJrB-00071y-RR@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 8472
Logged by: Luis Gonzalo Constantini Rickel
Email address: goncons(at)gmail(dot)com
PostgreSQL version: 9.2.4
Operating system: Windows
Description:

Hi,

I think that I found the reason why in Windows you receive the message
'could not find a \"%s\" to execute' (eg. 'could not find a "psql" to
execute') when you execute any of the Postgresql tools in the command line
(psql, pg_config, etc.). If the %PATH% environment variable has double
quotes for the directory where postgres is installed (eg. "C:\Program Files
(x86)\PostgreSQL\9.2\bin", that is valid for Windos), the function int
find_my_exec(const char *argv0, char *retpath) (in exec.c); interpret
incorrectly the file path, it try to check the file like eg.:
"C:\Program Files (x86)\PostgreSQL\9.2\bin"\psql.exe
instead of:
C:\Program Files (x86)\PostgreSQL\9.2\bin\psql.exe
or:
"C:\Program Files (x86)\PostgreSQL\9.2\bin\psql.exe"

This bug coud be duplicated in this way:
1). Add the Directory with double quotes to the %PATH% environment
variable.
2). execute psql.
3). You receive the message 'could not find a "psql" to execute'.
4). Add the Directory without double quotes to the %PATH% environment
variable.
5). execute psql.
6). You do not receive the message 'could not find a "psql" to execute'.

I hope this information is useful for you.

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2013-09-27 01:18:11 Re: BUG #8455: spanish pgadmin3.mo
Previous Message David Rennalls 2013-09-26 20:55:36 Re: select table indicate missing chunk number 0 for toast value 96635 in pg_toast_2619