From: goncons@gmail.com
To: pgsql-bugs@postgresql.org
Subject: BUG #8472: could not find a \"%s\" to execute. When Directory On %PATH% Has Double Quotes.
Date: Thu, 26 Sep 2013 22:16:21 +0000
Message-ID: <E1VPJrB-00071y-RR@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: goncons@gmail.com
Subject: Re: BUG #8472: could not find a \"%s\" to execute. When Directory On %PATH% Has Double Quotes.
In-Reply-To: <E1VPJrB-00071y-RR@wrigleys.postgresql.org>
References: <E1VPJrB-00071y-RR@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox