mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 11:17:57 +08:00
Use SUBSTR() alternative to LEFT() on PostgreSQL table data selection. See http://www.heidisql.com/forum.php?t=16072
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user