Skip to content

Commit 5f2959d

Browse files
committed
fix: SUBSTRING() on array typed VARCHARs throw "function substr(...) does not exist"
Refs #272
1 parent fa2bb05 commit 5f2959d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

source/dbconnection.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10845,8 +10845,8 @@ function TTableColumn.CastAsText: String;
1084510845
Result := 'CAST('+Result+' AS NVARCHAR('+IntToStr(GRIDMAXDATA)+'))';
1084610846
end;
1084710847
ngPgSQL: begin
10848-
if (DataType.Index in [dbdtUnknown, dbdtJson]) or (DataType.Category = dtcBinary) then
10849-
Result := Result + '::text';
10848+
// Cast *any* datatype, including VARCHAR and TEXT, which may have an [] array attribute
10849+
Result := Result + '::text';
1085010850
end;
1085110851
end;
1085210852
end;

0 commit comments

Comments
 (0)