Use SUBSTR() alternative to LEFT() on PostgreSQL table data selection. See http://www.heidisql.com/forum.php?t=16072

This commit is contained in:
Ansgar Becker
2014-08-20 17:26:16 +00:00
parent 3d1e40f91a
commit cf1a4270fc

View File

@ -4712,7 +4712,8 @@ begin
then begin
case DBObj.Connection.Parameters.NetTypeGroup of
ngMSSQL: Select := Select + ' LEFT(CAST(' + DBObj.Connection.QuoteIdent(c.Name) + ' AS NVARCHAR('+IntToStr(GRIDMAXDATA)+')), ' + IntToStr(GRIDMAXDATA) + '), ';
ngMySQL, ngPgSQL: Select := Select + ' LEFT(' + DBObj.Connection.QuoteIdent(c.Name) + ', ' + IntToStr(GRIDMAXDATA) + '), ';
ngMySQL: Select := Select + ' LEFT(' + DBObj.Connection.QuoteIdent(c.Name) + ', ' + IntToStr(GRIDMAXDATA) + '), ';
ngPgSQL: Select := Select + ' SUBSTR(' + DBObj.Connection.QuoteIdent(c.Name) + ', 0, ' + IntToStr(GRIDMAXDATA) + '), ';
end;
end else if DBObj.Connection.Parameters.IsMSSQL
and (c.DataType.Index=dtTimestamp)