mirror of https://github.com/citusdata/citus.git
Ensure worker_save_query_explain_analyze always fully qualifies types (#5776)
Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com> Co-authored-by: Marco Slot <marco.slot@gmail.com>pull/5772/head
parent
2cb02bfb56
commit
49467e27e6
|
@ -1418,7 +1418,9 @@ WrapQueryForExplainAnalyze(const char *queryString, TupleDesc tupleDesc)
|
|||
}
|
||||
|
||||
Form_pg_attribute attr = &tupleDesc->attrs[columnIndex];
|
||||
char *attrType = format_type_with_typemod(attr->atttypid, attr->atttypmod);
|
||||
char *attrType = format_type_extended(attr->atttypid, attr->atttypmod,
|
||||
FORMAT_TYPE_TYPEMOD_GIVEN |
|
||||
FORMAT_TYPE_FORCE_QUALIFY);
|
||||
|
||||
appendStringInfo(columnDef, "field_%d %s", columnIndex, attrType);
|
||||
}
|
||||
|
|
|
@ -3043,5 +3043,18 @@ Custom Scan (Citus Adaptive) (actual rows=1 loops=1)
|
|||
-> Task
|
||||
Node: host=localhost port=xxxxx dbname=regression
|
||||
-> Seq Scan on distributed_table_1_570032 distributed_table_xxx (actual rows=1 loops=1)
|
||||
CREATE TYPE multi_explain.int_wrapper_type AS (int_field int);
|
||||
CREATE TABLE tbl (a int, b multi_explain.int_wrapper_type);
|
||||
SELECT create_distributed_table('tbl', 'a');
|
||||
|
||||
EXPLAIN :default_analyze_flags SELECT * FROM tbl;
|
||||
Custom Scan (Citus Adaptive) (actual rows=0 loops=1)
|
||||
Task Count: 2
|
||||
Tuple data received from nodes: 0 bytes
|
||||
Tasks Shown: One of 2
|
||||
-> Task
|
||||
Tuple data received from node: 0 bytes
|
||||
Node: host=localhost port=xxxxx dbname=regression
|
||||
-> Seq Scan on tbl_570036 tbl (actual rows=0 loops=1)
|
||||
SET client_min_messages TO ERROR;
|
||||
DROP SCHEMA multi_explain CASCADE;
|
||||
|
|
|
@ -1084,5 +1084,11 @@ EXPLAIN :default_analyze_flags SELECT FROM (SELECT * FROM reference_table) subqu
|
|||
PREPARE dummy_prep_stmt(int) AS SELECT FROM distributed_table_1;
|
||||
EXPLAIN :default_analyze_flags EXECUTE dummy_prep_stmt(50);
|
||||
|
||||
CREATE TYPE multi_explain.int_wrapper_type AS (int_field int);
|
||||
CREATE TABLE tbl (a int, b multi_explain.int_wrapper_type);
|
||||
SELECT create_distributed_table('tbl', 'a');
|
||||
|
||||
EXPLAIN :default_analyze_flags SELECT * FROM tbl;
|
||||
|
||||
SET client_min_messages TO ERROR;
|
||||
DROP SCHEMA multi_explain CASCADE;
|
||||
|
|
Loading…
Reference in New Issue