Postgres authentication failure in UniDac 7.0.2

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
therat
Posts: 5
Joined: Wed 12 Jan 2011 16:38

Postgres authentication failure in UniDac 7.0.2

Post by therat » Fri 23 Jun 2017 06:27

I have a project that has been using UniDac for 3 years and I have used new versions of UniDac frequently during this time, without any issues.

Since 7.0.2, Delphi code which worked up until now, throws an authentication failure when connecting to the PostgreSQL database (9.5)

This is the code block which has worked flawlessly until 7.0.2:

class function TDb.NewDataConnection: TUniConnection;
begin
Result := TUniConnection.Create(nil);
Result.Server := SETTINGS.DataHost;
Result.Port := SETTINGS.DataPort;
Result.Username := SETTINGS.DataUserName;
Result.Password := SETTINGS.DataPassword;
Result.ProviderName := 'PostgreSQL';
Result.Database := SETTINGS.DataDatabase;
Result.PoolingOptions.MaxPoolSize := SETTINGS.PoolSize;
Result.PoolingOptions.MinPoolSize := 0;
Result.PoolingOptions.ConnectionLifetime := SETTINGS.PoolConnectionLifeTime;
Result.PoolingOptions.Validate := True;
Result.Pooling := True;
Result.Connect;
end;

Result.Connect returns authentication failure.

Going back to 7.0.1 it works again.

Please advise.

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: Postgres authentication failure in UniDac 7.0.2

Post by azyk » Mon 26 Jun 2017 07:49

We cannot reproduce the specified problem. Please provide the CREATE scripts for DATABASE, ROLE and USER, on which this problem is reproduced.

Post Reply