diff options
author | Pavan Deolasee | 2015-06-24 16:36:32 +0000 |
---|---|---|
committer | Pavan Deolasee | 2015-06-24 16:36:32 +0000 |
commit | 01368b13a5d958275dcff8d0d133f9d4bdbcf50f (patch) | |
tree | f1c83e015a8fb89b8272661c032580fe7a936c39 /src | |
parent | a0c0c66e2eee61366c5ccf4258262dfd9ee54f80 (diff) |
Add missing chunk to xc_FQS.out
We mistakenly left this out in the previous commit
Diffstat (limited to 'src')
-rw-r--r-- | src/test/regress/expected/xc_FQS.out | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/test/regress/expected/xc_FQS.out b/src/test/regress/expected/xc_FQS.out index c7a9e25ca9..2572437a53 100644 --- a/src/test/regress/expected/xc_FQS.out +++ b/src/test/regress/expected/xc_FQS.out @@ -1,3 +1,42 @@ +-- A function to create table on specified nodes +create or replace function cr_table(tab_schema varchar, nodenums int[], distribution varchar) +returns void language plpgsql as $$ +declare + cr_command varchar; + nodes varchar[]; + nodename varchar; + nodenames_query varchar; + nodenames varchar; + node int; + sep varchar; + tmp_node int; + num_nodes int; +begin + nodenames_query := 'SELECT node_name FROM pgxc_node WHERE node_type = ''D'''; + cr_command := 'CREATE TABLE ' || tab_schema || ' DISTRIBUTE BY ' || distribution || ' TO NODE ('; + for nodename in execute nodenames_query loop + nodes := array_append(nodes, nodename); + end loop; + nodenames := ''; + sep := ''; + num_nodes := array_length(nodes, 1); + foreach node in array nodenums loop + tmp_node := node; + if (tmp_node < 1 or tmp_node > num_nodes) then + tmp_node := tmp_node % num_nodes; + if (tmp_node < 1) then + tmp_node := num_nodes; + end if; + end if; + nodenames := nodenames || sep || nodes[tmp_node]; + sep := ', '; + end loop; + cr_command := cr_command || nodenames; + cr_command := cr_command || ')'; + + execute cr_command; +end; +$$; -- This file contains tests for Fast Query Shipping (FQS) for queries involving -- a single table -- Testset 1 for distributed table (by roundrobin) |