pmiranda@vm.com.br wrote in message
> connectDB() -- connect() failed: No such file or directory
> Is the postmaster running at 'localhost' and accepting connections on Unix
> socket '5432'?
>
> I figured that, although through Windows clients everything works fine,
> maybe from the command line it's not recognizing where Postgres is. Maybe,
> I missed some configuration parameter or something else (TCP/IP perhaps....
> what's pg_hba.conf for? How can I change it?)
If your Windows clients are accessing the database correctly (via ODBC
I presume), then you probably just don't have the correct
environmental variables set for DOS.
Try using this:
psql -h hostname -d database_name
where "hostname" is the IP address of the machine containing the
database and "database_name" is the database name.
Alternatively, you can set up your DOS environmental variables. Add
the following to your autoexec.bat or any other file that will execute
when you drop into a DOS shell.
set pghost=host_computer_name
set pgdata=c:\directory_where_the_db_exists
where host_computer_name is the IP address for the machine containing
your database and c:\directory_where_the_db_exists is the directory
containing the data.
pg_hba.conf is the file that allows you to change which
users/computers can access the database. It's where you can set up
security in your connections. You should be able to edit it with a
standard text editor providing that you have read/write access to the
file.
-Tony