[*]With version 8.4.1 there is a new property named MultipleConnections.
[*]The default of this property is true.
[*]Simple use case with temporary table fails
You can use following code to reproduce this issue.
Code: Select all
uses
System.SysUtils,
Uni,
PostgreSQLUniProvider;
procedure Test(const DisableMultipleConnection : boolean);
var
UniC : TUniConnection;
UniQ : TUniQuery;
begin
try
UniC := TUniConnection.Create(nil);
try
UniC.ProviderName := TPostgreSQLUniProvider.GetProviderName();
UniC.Database := 'postgres';
UniC.Username := 'postgres';
UniC.Password := 'postgres';
if DisableMultipleConnection then begin
UniC.SpecificOptions.Values['MultipleConnections'] := 'False';
end;
UniQ := TUniQuery.Create(nil);
try
UniQ.Connection := UniC;
UniQ.SQL.Text := 'CREATE TEMP TABLE foobar (foobar integer)';
UniQ.ExecSQL;
UniQ.SQL.Text := 'INSERT INTO foobar (foobar) VALUES (1)';
UniQ.ExecSQL;
UniQ.SQL.Text := 'SELECT * FROM foobar';
UniQ.Open;
UniQ.Close;
UniQ.SQL.Text := 'DROP TABLE foobar';
UniQ.ExecSQL;
finally
UniQ.Free;
end;
finally
UniC.Free;
end;
Writeln('Success');
except
on E : Exception do
Writeln(E.ClassName, ': ', E.Message);
end;
end;
begin
try
Test(True);
Test(False);
except
on E : Exception do
Writeln(E.ClassName, ': ', E.Message);
end;
Readln;