Fix UPDATE + DELETE queries in data grid for PostgreSQL, which do not support a LIMIT clause.

This commit is contained in:
Ansgar Becker
2014-08-26 18:04:35 +00:00
parent 17d2861a8c
commit 6e4de241a5

View File

@@ -4681,9 +4681,12 @@ begin
Result := Result + IntToStr(Limit);
end;
ngPgSQL: begin
Result := Result + QueryBody + ' LIMIT ' + IntToStr(Limit);
if Offset > 0 then
Result := Result + ' OFFSET ' + IntToStr(Offset);
if QueryType = 'SELECT' then begin
Result := Result + QueryBody + ' LIMIT ' + IntToStr(Limit);
if Offset > 0 then
Result := Result + ' OFFSET ' + IntToStr(Offset);
end else
Result := Result + QueryBody;
end;
end;
end;