Page 1 of 1

Postgres authentication failure in UniDac 7.0.2

Posted: Fri 23 Jun 2017 06:27
by therat
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.

Re: Postgres authentication failure in UniDac 7.0.2

Posted: Mon 26 Jun 2017 07:49
by azyk
We cannot reproduce the specified problem. Please provide the CREATE scripts for DATABASE, ROLE and USER, on which this problem is reproduced.