I recently installed PostgreSQL 8.2.11-1 on my Windows machine for use with my java application. I need to get a list of the databases available so that the user can choose one, but issuing a query of "\list" using jdbc doesn't seem to work. Perhaps it only works on the command line? I don't know. So instead, I wanted to try running it from the command line, using 'psql -l'.
When I try to run it from the command line (non-programmatically), this message will appear at least once, and then execution will continue as normal. Here's an example:
C:\>psql -l could not find a "psql" to execute List of databases Name | Owner | Encoding -----------+---------+----------- postgres | john | SQL_ASCII bob | john | UTF8 template0 | bob | SQL_ASCII template1 | bob | SQL_ASCII (4 rows)
C:\>
But when running this command programmatically, it does not continue after the initial failure. I did notice that there was a user-level PATH variable. I removed that and rebooted, but the problem still occurs. I know this is more of a Windows problem, but it seems specific to PostgreSQL. Any ideas?