mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Introduce a UNKNOWN data type in PostgreSQL, so we don't fall into a SQL error when opening the data grid with a SUBSTR() call on a non-text column, for example USER-DEFINED/GEOMETRY(POINT).
This commit is contained in:
@@ -1444,7 +1444,7 @@ begin
|
||||
end;
|
||||
rx.Free;
|
||||
if (not Match) and (FParameters.NetTypeGroup = ngPgSQL) then
|
||||
Result := FDatatypes[11];
|
||||
Result := FDatatypes[0];
|
||||
end;
|
||||
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ type
|
||||
dtDate, dtTime, dtYear, dtDatetime, dtSmalldatetime, dtTimestamp,
|
||||
dtChar, dtNchar, dtVarchar, dtNvarchar, dtTinytext, dtText, dtNtext, dtMediumtext, dtLongtext,
|
||||
dtBinary, dtVarbinary, dtTinyblob, dtBlob, dtMediumblob, dtLongblob, dtImage,
|
||||
dtEnum, dtSet, dtBit, dtVarBit, dtBool,
|
||||
dtEnum, dtSet, dtBit, dtVarBit, dtBool, dtUnknown,
|
||||
dtCursor, dtSqlvariant, dtTable, dtUniqueidentifier,
|
||||
dtPoint, dtLinestring, dtLineSegment, dtPolygon, dtGeometry, dtBox, dtPath, dtCircle, dtMultipoint, dtMultilinestring, dtMultipolygon, dtGeometrycollection
|
||||
);
|
||||
@@ -1121,8 +1121,19 @@ var
|
||||
)
|
||||
);
|
||||
|
||||
PostgreSQLDatatypes: Array[0..26] of TDBDatatype =
|
||||
PostgreSQLDatatypes: Array[0..27] of TDBDatatype =
|
||||
(
|
||||
(
|
||||
Index: dtUnknown;
|
||||
NativeTypes: '99999';
|
||||
Name: 'UNKNOWN';
|
||||
Description: 'Unknown data type';
|
||||
HasLength: False;
|
||||
RequiresLength: False;
|
||||
HasBinary: False;
|
||||
HasDefault: False;
|
||||
Category: dtcOther;
|
||||
),
|
||||
(
|
||||
Index: dtSmallint;
|
||||
NativeTypes: '21';
|
||||
|
||||
Reference in New Issue
Block a user