Skip to content

Commit f65bd15

Browse files
committed
chore: debugging missing columns from IS.COLUMNS on PG v16
Refs #2338
1 parent 79e4654 commit f65bd15

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

source/dbconnection.pas

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5869,7 +5869,11 @@ function TDBConnection.GetTableColumns(Table: TDBObject): TTableColumnList;
58695869
Col.LengthSet := MaxLen;
58705870
end;
58715871
Col.Charset := ColQuery.Col('CHARACTER_SET_NAME');
5872-
Col.Collation := ColQuery.Col('COLLATION_NAME', True);
5872+
if not ColQuery.ColExists('COLLATION_NAME') then begin
5873+
// Debugging issue #2338 with missing columns on PG v16:
5874+
Log(lcError, 'Missing column COLLATION_NAME: '+ColQuery.ColumnNames.CommaText);
5875+
end;
5876+
Col.Collation := ColQuery.Col('COLLATION_NAME');
58735877
// MSSQL has no expression
58745878
Col.GenerationExpression := ColQuery.Col('GENERATION_EXPRESSION', True);
58755879
Col.GenerationExpression := UnescapeString(Col.GenerationExpression);

0 commit comments

Comments
 (0)