Skip to content

Commit

Permalink
Merge pull request #53721 from takakawa/possible_wrong_type_conversio…
Browse files Browse the repository at this point in the history
…n_bugfix

[bugfix] possible postgresql logical replication error: wrong type conversion
  • Loading branch information
alexey-milovidov committed Nov 26, 2023
2 parents f63048e + 09f263e commit 9fa112a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Databases/PostgreSQL/fetchPostgreSQLTableStructure.cpp
Expand Up @@ -263,7 +263,8 @@ PostgreSQLTableStructure fetchPostgreSQLTableStructure(
"attnotnull AS not_null, attndims AS dims, atttypid as type_id, atttypmod as type_modifier "
"FROM pg_attribute "
"WHERE attrelid = (SELECT oid FROM pg_class WHERE {}) "
"AND NOT attisdropped AND attnum > 0", where);
"AND NOT attisdropped AND attnum > 0 "
"ORDER BY attnum ASC", where);

auto postgres_table_with_schema = postgres_schema.empty() ? postgres_table : doubleQuoteString(postgres_schema) + '.' + doubleQuoteString(postgres_table);
table.physical_columns = readNamesAndTypesList(tx, postgres_table_with_schema, query, use_nulls, false);
Expand Down

0 comments on commit 9fa112a

Please sign in to comment.