Add test for issue, does not reproduce issue

pull/3495/head
Philip Dubé 2020-02-12 23:17:50 +00:00
parent 6d6ef54775
commit d7a4ffdc46
2 changed files with 30 additions and 3 deletions

View File

@ -242,8 +242,25 @@ DEBUG: Plan XXX query after replacing subqueries and CTEs: SELECT user_id FROM
(2 rows)
SET client_min_messages TO DEFAULT;
-- Test https://github.com/citusdata/citus/issues/2717
create table test_dist (id int, table_name text, column_name text);
select create_distributed_table('test_dist','id');
create_distributed_table
---------------------------------------------------------------------
(1 row)
insert into test_dist values (1, 'test_dist', 'table_name');
with q as (
select icl.* from test_dist td
join information_schema.columns icl on icl.table_name::text = lower(td.table_name) and icl.column_name::text = lower(td.column_name)
) select column_name from q;
column_name
---------------------------------------------------------------------
table_name
(1 row)
\set VERBOSITY terse
DROP SCHEMA subquery_local_tables CASCADE;
NOTICE: drop cascades to 2 other objects
DETAIL: drop cascades to table users_table_local
drop cascades to table events_table_local
NOTICE: drop cascades to 3 other objects
SET search_path TO public;

View File

@ -200,5 +200,15 @@ ORDER BY 1;
SET client_min_messages TO DEFAULT;
-- Test https://github.com/citusdata/citus/issues/2717
create table test_dist (id int, table_name text, column_name text);
select create_distributed_table('test_dist','id');
insert into test_dist values (1, 'test_dist', 'table_name');
with q as (
select icl.* from test_dist td
join information_schema.columns icl on icl.table_name::text = lower(td.table_name) and icl.column_name::text = lower(td.column_name)
) select column_name from q;
\set VERBOSITY terse
DROP SCHEMA subquery_local_tables CASCADE;
SET search_path TO public;