Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VPOSI-0001tV-Jc for pgsql-bugs@arkaria.postgresql.org; Fri, 27 Sep 2013 03:10:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VPOSH-0001UL-Fk for pgsql-bugs@arkaria.postgresql.org; Fri, 27 Sep 2013 03:10:57 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VPJrK-00058y-9U for pgsql-bugs@postgresql.org; Thu, 26 Sep 2013 22:16:30 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VPJrH-00005d-MU for pgsql-bugs@postgresql.org; Thu, 26 Sep 2013 22:16:29 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VPJrH-0001GL-61 for pgsql-bugs@postgresql.org; Thu, 26 Sep 2013 22:16:27 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.80) (envelope-from ) id 1VPJrB-00071y-RR for pgsql-bugs@postgresql.org; Thu, 26 Sep 2013 22:16:21 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: BUG #8472: could not find a \"%s\" to execute. When Directory On %PATH% Has Double Quotes. To: pgsql-bugs@postgresql.org From: goncons@gmail.com Message-Id: Date: Thu, 26 Sep 2013 22:16:21 +0000 X-Pg-Spam-Score: -0.7 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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