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

From goncons@gmail.com
Subject BUG #8472: could not find a \"%s\" to execute. When Directory On %PATH% Has Double Quotes.
Date
Msg-id E1VPJrB-00071y-RR@wrigleys.postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      8472
Logged by:          Luis Gonzalo Constantini Rickel
Email address:      goncons@gmail.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.

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: BUG #8455: spanish pgadmin3.mo
Next
From: Guillaume Lelarge
Date:
Subject: Re: BUG #8455: spanish pgadmin3.mo