Use single-quote interpolation in partition test

Noticed an old issue and this outdated comment. Figured I'd fix it.
pull/862/head
Jason Petersen 2016-10-07 17:16:03 -06:00
parent 76d86e1ac9
commit d140d1c934
No known key found for this signature in database
GPG Key ID: 9F1D3510D110ABA9
2 changed files with 19 additions and 19 deletions

View File

@ -14,6 +14,11 @@ ALTER SEQUENCE pg_catalog.pg_dist_jobid_seq RESTART 1160000;
\set Table_Part_01 lineitem_range_part_01 \set Table_Part_01 lineitem_range_part_01
\set Table_Part_02 lineitem_range_part_02 \set Table_Part_02 lineitem_range_part_02
\set Table_Part_03 lineitem_range_part_03 \set Table_Part_03 lineitem_range_part_03
\set File_Basedir base/pgsql_job_cache
\set Table_File_00 :File_Basedir/job_:JobId/task_:TaskId/p_00000
\set Table_File_01 :File_Basedir/job_:JobId/task_:TaskId/p_00001
\set Table_File_02 :File_Basedir/job_:JobId/task_:TaskId/p_00002
\set Table_File_03 :File_Basedir/job_:JobId/task_:TaskId/p_00003
-- Run select query, and apply range partitioning on query results -- Run select query, and apply range partitioning on query results
SELECT worker_range_partition_table(:JobId, :TaskId, :Select_Query_Text, SELECT worker_range_partition_table(:JobId, :TaskId, :Select_Query_Text,
:Partition_Column_Text, :Partition_Column_Type, :Partition_Column_Text, :Partition_Column_Type,
@ -23,15 +28,10 @@ SELECT worker_range_partition_table(:JobId, :TaskId, :Select_Query_Text,
(1 row) (1 row)
-- Note that the following file names depend on job and task identifiers. We COPY :Table_Part_00 FROM :'Table_File_00';
-- prefer to substitute them here, but the current psql version does not perform COPY :Table_Part_01 FROM :'Table_File_01';
-- variable interpolation for names inside single quotes. This SQL interpolation COPY :Table_Part_02 FROM :'Table_File_02';
-- issue is fixed in PostgreSQL 9.0; and once we upgrade, we will change both COPY :Table_Part_03 FROM :'Table_File_03';
-- the following filenames, and the sequence names in the relay_sequence tests.
COPY :Table_Part_00 FROM 'base/pgsql_job_cache/job_201010/task_101101/p_00000';
COPY :Table_Part_01 FROM 'base/pgsql_job_cache/job_201010/task_101101/p_00001';
COPY :Table_Part_02 FROM 'base/pgsql_job_cache/job_201010/task_101101/p_00002';
COPY :Table_Part_03 FROM 'base/pgsql_job_cache/job_201010/task_101101/p_00003';
SELECT COUNT(*) FROM :Table_Part_00; SELECT COUNT(*) FROM :Table_Part_00;
count count
------- -------

View File

@ -21,22 +21,22 @@ ALTER SEQUENCE pg_catalog.pg_dist_jobid_seq RESTART 1160000;
\set Table_Part_02 lineitem_range_part_02 \set Table_Part_02 lineitem_range_part_02
\set Table_Part_03 lineitem_range_part_03 \set Table_Part_03 lineitem_range_part_03
\set File_Basedir base/pgsql_job_cache
\set Table_File_00 :File_Basedir/job_:JobId/task_:TaskId/p_00000
\set Table_File_01 :File_Basedir/job_:JobId/task_:TaskId/p_00001
\set Table_File_02 :File_Basedir/job_:JobId/task_:TaskId/p_00002
\set Table_File_03 :File_Basedir/job_:JobId/task_:TaskId/p_00003
-- Run select query, and apply range partitioning on query results -- Run select query, and apply range partitioning on query results
SELECT worker_range_partition_table(:JobId, :TaskId, :Select_Query_Text, SELECT worker_range_partition_table(:JobId, :TaskId, :Select_Query_Text,
:Partition_Column_Text, :Partition_Column_Type, :Partition_Column_Text, :Partition_Column_Type,
ARRAY[1, 3000, 12000]::_int8); ARRAY[1, 3000, 12000]::_int8);
-- Note that the following file names depend on job and task identifiers. We COPY :Table_Part_00 FROM :'Table_File_00';
-- prefer to substitute them here, but the current psql version does not perform COPY :Table_Part_01 FROM :'Table_File_01';
-- variable interpolation for names inside single quotes. This SQL interpolation COPY :Table_Part_02 FROM :'Table_File_02';
-- issue is fixed in PostgreSQL 9.0; and once we upgrade, we will change both COPY :Table_Part_03 FROM :'Table_File_03';
-- the following filenames, and the sequence names in the relay_sequence tests.
COPY :Table_Part_00 FROM 'base/pgsql_job_cache/job_201010/task_101101/p_00000';
COPY :Table_Part_01 FROM 'base/pgsql_job_cache/job_201010/task_101101/p_00001';
COPY :Table_Part_02 FROM 'base/pgsql_job_cache/job_201010/task_101101/p_00002';
COPY :Table_Part_03 FROM 'base/pgsql_job_cache/job_201010/task_101101/p_00003';
SELECT COUNT(*) FROM :Table_Part_00; SELECT COUNT(*) FROM :Table_Part_00;
SELECT COUNT(*) FROM :Table_Part_03; SELECT COUNT(*) FROM :Table_Part_03;