Skip to content

Commit 369354d

Browse files
committed
fix: SUBSTRING() on array typed VARCHARs throw "function substr(...) does not exist"
Refs #272
1 parent 62caaf9 commit 369354d

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
@@ -10958,8 +10958,8 @@ function TTableColumn.CastAsText: String;
1095810958
Result := 'CAST('+Result+' AS NVARCHAR('+IntToStr(GRIDMAXDATA)+'))';
1095910959
end;
1096010960
ngPgSQL: begin
10961-
if (DataType.Index in [dbdtUnknown, dbdtJson]) or (DataType.Category = dtcBinary) then
10962-
Result := Result + '::text';
10961+
// Cast *any* datatype, including VARCHAR and TEXT, which may have an [] array attribute
10962+
Result := Result + '::text';
1096310963
end;
1096410964
end;
1096510965
end;

0 commit comments

Comments
 (0)