Page 1 of 1

PostgreSQL - GetServerList and GetDatabaseNames

Posted: Mon 09 May 2011 17:39
by eduardomendes
Hi,

the GetServerList procedure, of TUniConnectDialog does not list PostgreSQL Linux servers, only Windows servers.

Why?


If I try execute GetDatabaseNames of TUniConnection with users other than "postgres" the following error occurs:

---------------------------
Project1
---------------------------
Cannot connect to database
---------------------------
OK
---------------------------

UniConnection.ProviderName := 'PostgreSQL';
UniConnection.Server := 'ServerName';
UniConnection.Username := 'test_user';
UniConnection.Password := '123456';

UniConnection.GetDatabaseNames(ListDataBase);


How can I fix this problem?

Thanks!

Posted: Wed 11 May 2011 12:49
by AlexP
Hello,

This problem is connected with the fact that we are using the standard WinApi function to look for servers, and this function cannot see Linux servers.

But the GetDatabaseNames method works correctly.
I have created a new "simple" user like

CREATE ROLE test LOGIN
NOINHERIT
VALID UNTIL 'infinity';

and I got a list of avaliable databases without any errors using the GetDatabaseNames method.

Posted: Wed 11 May 2011 21:01
by eduardomendes
Hello AlexP,

you will also implemented a search for Linux servers?

Thanks!

Posted: Fri 13 May 2011 11:13
by AlexP
Hello,

It's likely that we will not implement such functionality. It's connected with the fact that third-party tools should be used to define PostgreSQL servers on Linux, or we should check all possible ports on all computers with Linux.