PostgreSQL - GetServerList and GetDatabaseNames

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
eduardomendes
Posts: 28
Joined: Wed 24 Feb 2010 14:08

PostgreSQL - GetServerList and GetDatabaseNames

Post by eduardomendes » Mon 09 May 2011 17:39

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!

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Wed 11 May 2011 12:49

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.

eduardomendes
Posts: 28
Joined: Wed 24 Feb 2010 14:08

Post by eduardomendes » Wed 11 May 2011 21:01

Hello AlexP,

you will also implemented a search for Linux servers?

Thanks!

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Fri 13 May 2011 11:13

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.

Post Reply