summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier2012-08-22 23:20:02 +0000
committerMichael Paquier2012-08-22 23:32:27 +0000
commit0ee3600141696f422d425762ae1f236cb551be98 (patch)
treeff250a358369ecf34af01648df11b2cfbfe5c851
parent5f534780fcd616c0df4092f7b4bc09c5321d8e3f (diff)
Remove reserved keywords REPLICATION, MODULO, HASH, ROUND and ROBIN
Those keywords were used for clause DISTRIBUTE BY to define a distribution type. In order to being more flexiblity and extensibility on this code, a method based on IDENT is instead used. This fixes directly an issue with ALTER ROLE which was using the word REPLICATION to allow a user to use the replication protocol.
-rw-r--r--doc-xc/src/sgml/ddl.sgmlin6
-rw-r--r--doc-xc/src/sgml/ref/alter_table.sgmlin4
-rw-r--r--doc-xc/src/sgml/ref/create_table.sgmlin8
-rw-r--r--doc-xc/src/sgml/ref/create_table_as.sgmlin6
-rw-r--r--doc-xc/src/sgml/ref/select_into.sgmlin2
-rw-r--r--src/backend/parser/gram.y93
-rw-r--r--src/include/parser/kwlist.h15
-rw-r--r--src/test/regress/expected/alter_table.out22
-rw-r--r--src/test/regress/expected/arrays.out2
-rw-r--r--src/test/regress/expected/rules.out22
-rw-r--r--src/test/regress/expected/xc_FQS.out6
-rw-r--r--src/test/regress/expected/xc_alter_table.out2
-rw-r--r--src/test/regress/expected/xc_distkey.out2
-rw-r--r--src/test/regress/expected/xc_remote.out6
-rw-r--r--src/test/regress/expected/xc_sequence.out4
-rw-r--r--src/test/regress/expected/xc_temp.out4
-rw-r--r--src/test/regress/sql/alter_table.sql22
-rw-r--r--src/test/regress/sql/arrays.sql2
-rw-r--r--src/test/regress/sql/inherit.sql8
-rw-r--r--src/test/regress/sql/plpgsql.sql2
-rw-r--r--src/test/regress/sql/rules.sql22
-rw-r--r--src/test/regress/sql/xc_FQS.sql6
-rw-r--r--src/test/regress/sql/xc_alter_table.sql2
-rw-r--r--src/test/regress/sql/xc_distkey.sql2
-rw-r--r--src/test/regress/sql/xc_remote.sql6
-rw-r--r--src/test/regress/sql/xc_sequence.sql4
-rw-r--r--src/test/regress/sql/xc_temp.sql4
27 files changed, 125 insertions, 159 deletions
diff --git a/doc-xc/src/sgml/ddl.sgmlin b/doc-xc/src/sgml/ddl.sgmlin
index 2887dfb0b0..800d75f939 100644
--- a/doc-xc/src/sgml/ddl.sgmlin
+++ b/doc-xc/src/sgml/ddl.sgmlin
@@ -170,7 +170,7 @@ CREATE TABLE products (
generate hash value as an index for Datanode which accommodate the
row.
You can choose another distribution method such as <type>MODULO</> and
- <type>ROUND ROBIN</>.
+ <type>ROUNDROBIN</>.
To specify what column to choose as the distribution column and what value test to
choose, you can do as follows:
<programlisting>
@@ -183,7 +183,7 @@ CREATE TABLE products (
In this case, the column <type>product_no</> is chosen as the distribute column and
the target Datanode of each row is determined based upon the hash value of the column.
You can use <type>MODULO</> to specify modulo to test and determine the target Datanode.
- You can also specify <type>ROUND ROBIN</> to determine the Datanode by the order each
+ You can also specify <type>ROUNDROBIN</> to determine the Datanode by the order each
row is inserted.
</para>
@@ -663,7 +663,7 @@ CREATE TABLE products (
In <productname>Postgres-XC</>, in distributed
tables, <literal>UNIQUE</literal> constraints must include the
distribution column of the table. If the table is distributed
- by <type>ROUND ROBIN</type>, you cannot enforce <type>UNIQUE</>
+ by <type>ROUNDROBIN</type>, you cannot enforce <type>UNIQUE</>
constraint because it does not have a distribution column.
There's no restriction in <type>UNIQUE</> constraint in replicated
tables.
diff --git a/doc-xc/src/sgml/ref/alter_table.sgmlin b/doc-xc/src/sgml/ref/alter_table.sgmlin
index 9116c8313e..34a9fe3a54 100644
--- a/doc-xc/src/sgml/ref/alter_table.sgmlin
+++ b/doc-xc/src/sgml/ref/alter_table.sgmlin
@@ -67,7 +67,7 @@ ALTER TABLE <replaceable class="PARAMETER">name</replaceable>
NOT OF
OWNER TO <replaceable class="PARAMETER">new_owner</replaceable>
SET TABLESPACE <replaceable class="PARAMETER">new_tablespace</replaceable>
- DISTRIBUTE BY { REPLICATION | ROUND ROBIN | { [HASH | MODULO ] ( <replaceable class="PARAMETER">column_name</replaceable> ) } }
+ DISTRIBUTE BY { REPLICATION | ROUNDROBIN | { [HASH | MODULO ] ( <replaceable class="PARAMETER">column_name</replaceable> ) } }
TO { GROUP <replaceable class="PARAMETER">groupname</replaceable> | NODE ( <replaceable class="PARAMETER">nodename</replaceable> [, ... ] ) }
ADD NODE ( <replaceable class="PARAMETER">nodename</replaceable> [, ... ] )
DELETE NODE ( <replaceable class="PARAMETER">nodename</replaceable> [, ... ] )
@@ -600,7 +600,7 @@ ALTER TABLE <replaceable class="PARAMETER">name</replaceable>
</varlistentry>
<varlistentry>
- <term><literal>ROUND ROBIN</literal></term>
+ <term><literal>ROUNDROBIN</literal></term>
<listitem>
<para>
Each row of the table will be placed in one of the Datanodes
diff --git a/doc-xc/src/sgml/ref/create_table.sgmlin b/doc-xc/src/sgml/ref/create_table.sgmlin
index c1ed7657c8..0e983adc2d 100644
--- a/doc-xc/src/sgml/ref/create_table.sgmlin
+++ b/doc-xc/src/sgml/ref/create_table.sgmlin
@@ -93,7 +93,7 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXI
[ WITH ( <replaceable class="PARAMETER">storage_parameter</replaceable> [= <replaceable class="PARAMETER">value</replaceable>] [, ... ] ) | WITH OIDS | WITHOUT OIDS ]
[ ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP } ]
[ TABLESPACE <replaceable class="PARAMETER">tablespace</replaceable> ]
-[ DISTRIBUTE BY { REPLICATION | ROUND ROBIN | { [HASH | MODULO ] ( <replaceable class="PARAMETER">column_name</replaceable> ) } } ]
+[ DISTRIBUTE BY { REPLICATION | ROUNDROBIN | { [HASH | MODULO ] ( <replaceable class="PARAMETER">column_name</replaceable> ) } } ]
[ TO { GROUP <replaceable class="PARAMETER">groupname</replaceable> | NODE ( <replaceable class="PARAMETER">nodename</replaceable> [, ... ] ) } ]
CREATE TABLE <replaceable class="PARAMETER">table_name</replaceable>
@@ -105,7 +105,7 @@ CREATE TABLE <replaceable class="PARAMETER">table_name</replaceable>
[ WITH ( <replaceable class="PARAMETER">storage_parameter</replaceable> [= <replaceable class="PARAMETER">value</replaceable>] [, ... ] ) | WITH OIDS | WITHOUT OIDS ]
[ ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP } ]
[ TABLESPACE <replaceable class="PARAMETER">tablespace</replaceable> ]
-[ DISTRIBUTE BY { REPLICATION | ROUND ROBIN | { [HASH | MODULO ] ( <replaceable class="PARAMETER">column_name</replaceable> ) } } ]
+[ DISTRIBUTE BY { REPLICATION | ROUNDROBIN | { [HASH | MODULO ] ( <replaceable class="PARAMETER">column_name</replaceable> ) } } ]
[ TO { GROUP <replaceable class="PARAMETER">groupname</replaceable> | NODE ( <replaceable class="PARAMETER">nodename</replaceable> [, ... ] ) } ]
<phrase>where <replaceable class="PARAMETER">column_constraint</replaceable> is:</phrase>
@@ -976,7 +976,7 @@ CREATE TABLE <replaceable class="PARAMETER">table_name</replaceable>
</varlistentry>
<varlistentry>
- <term><literal>ROUND ROBIN</literal></term>
+ <term><literal>ROUNDROBIN</literal></term>
<listitem>
<para>
Each row of the table will be placed in one of the Datanodes
@@ -1028,7 +1028,7 @@ CREATE TABLE <replaceable class="PARAMETER">table_name</replaceable>
UNIQUE constraint will be chosen as the distribution key. If no
such column is specified, distribution column is the first
eligible column in the definition. If no such column is found,
- then the table will be distributed by <literal>ROUND ROBIN</>.
+ then the table will be distributed by <literal>ROUNDROBIN</>.
</para>
</listitem>
diff --git a/doc-xc/src/sgml/ref/create_table_as.sgmlin b/doc-xc/src/sgml/ref/create_table_as.sgmlin
index ab6a81281d..23644ba710 100644
--- a/doc-xc/src/sgml/ref/create_table_as.sgmlin
+++ b/doc-xc/src/sgml/ref/create_table_as.sgmlin
@@ -38,7 +38,7 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE <replaceable
[ WITH ( <replaceable class="PARAMETER">storage_parameter</replaceable> [= <replaceable class="PARAMETER">value</replaceable>] [, ... ] ) | WITH OIDS | WITHOUT OIDS ]
[ ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP } ]
[ TABLESPACE <replaceable class="PARAMETER">tablespace</replaceable> ]
- [ DISTRIBUTE BY { REPLICATION | ROUND ROBIN | { [HASH | MODULO ] ( <replaceable class="PARAMETER">column_name</replaceable> ) } } ]
+ [ DISTRIBUTE BY { REPLICATION | ROUNDROBIN | { [HASH | MODULO ] ( <replaceable class="PARAMETER">column_name</replaceable> ) } } ]
[ TO { GROUP <replaceable class="PARAMETER">groupname</replaceable> | NODE ( <replaceable class="PARAMETER">nodename</replaceable> [, ... ] ) } ]
AS <replaceable>query</replaceable>
[ WITH [ NO ] DATA ]
@@ -239,7 +239,7 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE <replaceable
</varlistentry>
<varlistentry>
- <term><literal>ROUND ROBIN</literal></term>
+ <term><literal>ROUNDROBIN</literal></term>
<listitem>
<para>
Each row of the table will be placed in one of the Datanodes
@@ -291,7 +291,7 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE <replaceable
UNIQUE constraint will be chosen as the distribution key. If no
such column is specified, distribution column is the first
eligible column in the definition. If no such column is found,
- then the table will be distributed by <literal>ROUND ROBIN</>.
+ then the table will be distributed by <literal>ROUNDROBIN</>.
</para>
</listitem>
diff --git a/doc-xc/src/sgml/ref/select_into.sgmlin b/doc-xc/src/sgml/ref/select_into.sgmlin
index b78ded7923..fc72997b81 100644
--- a/doc-xc/src/sgml/ref/select_into.sgmlin
+++ b/doc-xc/src/sgml/ref/select_into.sgmlin
@@ -122,7 +122,7 @@ SELECT [ ALL | DISTINCT [ ON ( <replaceable class="parameter">expression</replac
of the newly-created table on all the node respecting the default
distribution which is <literal>HASH</literal> on the first column
having a type that can be distributed. If no columns are found,
- distribution is done by <literal>ROUND ROBIN</literal>.
+ distribution is done by <literal>ROUNDROBIN</literal>.
</para>
<!## end>
</refsect1>
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index f16dfc8de3..718de74092 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -477,7 +477,7 @@ static void processCASbits(int cas_bits, int location, const char *constrType,
opt_frame_clause frame_extent frame_bound
%type <str> opt_existing_window_name
/* PGXC_BEGIN */
-%type <str> opt_barrier_id
+%type <str> opt_barrier_id OptDistributeType
%type <distby> OptDistributeBy OptDistributeByInternal
%type <subclus> OptSubCluster OptSubClusterInternal
/* PGXC_END */
@@ -504,8 +504,7 @@ static void processCASbits(int cas_bits, int location, const char *constrType,
*/
/* ordinary key words in alphabetical order */
-/* PGXC - added DISTRIBUTE, DIRECT, HASH, REPLICATION, ROUND ROBIN,
- * COORDINATOR, CLEAN, MODULO, NODE, BARRIER */
+/* PGXC - added DISTRIBUTE, DIRECT, COORDINATOR, CLEAN, NODE, BARRIER */
%token <keyword> ABORT_P ABSOLUTE_P ACCESS ACTION ADD_P ADMIN AFTER
AGGREGATE ALL ALSO ALTER ALWAYS ANALYSE ANALYZE AND ANY ARRAY AS ASC
ASSERTION ASSIGNMENT ASYMMETRIC AT ATTRIBUTE AUTHORIZATION
@@ -525,7 +524,7 @@ static void processCASbits(int cas_bits, int location, const char *constrType,
DATA_P DATABASE DAY_P DEALLOCATE DEC DECIMAL_P DECLARE DEFAULT DEFAULTS
DEFERRABLE DEFERRED DEFINER DELETE_P DELIMITER DELIMITERS DESC
/* PGXC_BEGIN */
- DICTIONARY DIRECT DISABLE_P DISCARD DISTINCT DISTRIBUTE DO DOCUMENT_P DOMAIN_P DOUBLE_P
+ DICTIONARY DIRECT DISABLE_P DISCARD DISTINCT DISTRIBUTE DO DOCUMENT_P DOMAIN_P DOUBLE_P
/* PGXC_END */
DROP
@@ -538,9 +537,7 @@ static void processCASbits(int cas_bits, int location, const char *constrType,
GLOBAL GRANT GRANTED GREATEST GROUP_P
-/* PGXC_BEGIN */
- HANDLER HASH HAVING HEADER_P HOLD HOUR_P
-/* PGXC_END */
+ HANDLER HAVING HEADER_P HOLD HOUR_P
IDENTITY_P IF_P ILIKE IMMEDIATE IMMUTABLE IMPLICIT_P IN_P
INCLUDING INCREMENT INDEX INDEXES INHERIT INHERITS INITIALLY INLINE_P
@@ -554,9 +551,7 @@ static void processCASbits(int cas_bits, int location, const char *constrType,
LABEL LANGUAGE LARGE_P LAST_P LC_COLLATE_P LC_CTYPE_P LEADING LEAKPROOF
LEAST LEFT LEVEL LIKE LIMIT LISTEN LOAD LOCAL LOCALTIME LOCALTIMESTAMP
LOCATION LOCK_P
-/* PGXC_BEGIN */
- MAPPING MATCH MAXVALUE MINUTE_P MINVALUE MODE MODULO MONTH_P MOVE
-/* PGXC_END */
+ MAPPING MATCH MAXVALUE MINUTE_P MINVALUE MODE MONTH_P MOVE
NAME_P NAMES NATIONAL NATURAL NCHAR NEXT NO NODE NONE
NOT NOTHING NOTIFY NOTNULL NOWAIT NULL_P NULLIF NULLS_P NUMERIC
@@ -572,11 +567,9 @@ static void processCASbits(int cas_bits, int location, const char *constrType,
QUOTE
RANGE READ REAL REASSIGN RECHECK RECURSIVE REF REFERENCES REINDEX
-/* PGXC_BEGIN */
- RELATIVE_P RELEASE RENAME REPEATABLE REPLACE REPLICA REPLICATION
- RESET RESTART RESTRICT RETURNING RETURNS REVOKE RIGHT ROBIN ROLE ROLLBACK
- ROUND ROW ROWS RULE
-/* PGXC_END */
+ RELATIVE_P RELEASE RENAME REPEATABLE REPLACE REPLICA
+ RESET RESTART RESTRICT RETURNING RETURNS REVOKE RIGHT ROLE ROLLBACK
+ ROW ROWS RULE
SAVEPOINT SCHEMA SCROLL SEARCH SECOND_P SECURITY SELECT SEQUENCE SEQUENCES
SERIALIZABLE SERVER SESSION SESSION_USER SET SETOF SHARE
@@ -2510,14 +2503,14 @@ copy_generic_opt_arg_list_item:
* PGXC-related extensions:
* 1) Distribution type of a table:
* DISTRIBUTE BY ( HASH(column) | MODULO(column) |
- * REPLICATION | ROUND ROBIN )
+ * REPLICATION | ROUNDROBIN )
* 2) Subcluster for table
* TO ( GROUP groupname | NODE nodename1,...,nodenameN )
*
*****************************************************************************/
CreateStmt: CREATE OptTemp TABLE qualified_name '(' OptTableElementList ')'
- OptInherit OptWith OnCommitOption OptTableSpace
+ OptInherit OptWith OnCommitOption OptTableSpace
/* PGXC_BEGIN */
OptDistributeBy OptSubCluster
/* PGXC_END */
@@ -3179,39 +3172,43 @@ OptTableSpace: TABLESPACE name { $$ = $2; }
;
/* PGXC_BEGIN */
-DistributeByHash: DISTRIBUTE BY
- | DISTRIBUTE BY HASH
- ;
-
OptDistributeBy: OptDistributeByInternal { $$ = $1; }
| /* EMPTY */ { $$ = NULL; }
;
-OptDistributeByInternal: DistributeByHash '(' name ')'
- {
- DistributeBy *n = makeNode(DistributeBy);
- n->disttype = DISTTYPE_HASH;
- n->colname = $3;
- $$ = n;
- }
- | DISTRIBUTE BY MODULO '(' name ')'
+/*
+ * For the distribution type, we use IDENT to limit the impact of keywords
+ * related to distribution on other commands and to allow extensibility for
+ * new distributions.
+ */
+OptDistributeType: IDENT { $$ = $1; }
+ ;
+
+OptDistributeByInternal: DISTRIBUTE BY OptDistributeType '(' name ')'
{
DistributeBy *n = makeNode(DistributeBy);
- n->disttype = DISTTYPE_MODULO;
+ if (strcmp($3, "modulo") == 0)
+ n->disttype = DISTTYPE_MODULO;
+ else if (strcmp($3, "hash") == 0)
+ n->disttype = DISTTYPE_HASH;
+ else
+ ereport(ERROR,
+ (errcode(ERRCODE_SYNTAX_ERROR),
+ errmsg("unrecognized distribution option \"%s\"", $3)));
n->colname = $5;
$$ = n;
}
- | DISTRIBUTE BY REPLICATION
- {
- DistributeBy *n = makeNode(DistributeBy);
- n->disttype = DISTTYPE_REPLICATION;
- n->colname = NULL;
- $$ = n;
- }
- | DISTRIBUTE BY ROUND ROBIN
+ | DISTRIBUTE BY OptDistributeType
{
DistributeBy *n = makeNode(DistributeBy);
- n->disttype = DISTTYPE_ROUNDROBIN;
+ if (strcmp($3, "replication") == 0)
+ n->disttype = DISTTYPE_REPLICATION;
+ else if (strcmp($3, "roundrobin") == 0)
+ n->disttype = DISTTYPE_ROUNDROBIN;
+ else
+ ereport(ERROR,
+ (errcode(ERRCODE_SYNTAX_ERROR),
+ errmsg("unrecognized distribution option \"%s\"", $3)));
n->colname = NULL;
$$ = n;
}
@@ -12632,8 +12629,7 @@ ColLabel: IDENT { $$ = $1; }
/* "Unreserved" keywords --- available for use as any kind of name.
*/
-/* PGXC - added DISTRIBUTE, DIRECT, HASH, REPLICATION, ROUND ROBIN,
- * COORDINATOR, CLEAN, MODULO, NODE, BARRIER */
+/* PGXC - added DISTRIBUTE, DIRECT, COORDINATOR, CLEAN, NODE, BARRIER */
unreserved_keyword:
ABORT_P
| ABSOLUTE_P
@@ -12731,9 +12727,6 @@ unreserved_keyword:
| GLOBAL
| GRANTED
| HANDLER
-/* PGXC_BEGIN */
- | HASH
-/* PGXC_END */
| HEADER_P
| HOLD
| HOUR_P
@@ -12775,9 +12768,6 @@ unreserved_keyword:
| MINUTE_P
| MINVALUE
| MODE
-/* PGXC_BEGIN */
- | MODULO
-/* PGXC_END */
| MONTH_P
| MOVE
| NAME_P
@@ -12829,22 +12819,13 @@ unreserved_keyword:
| REPEATABLE
| REPLACE
| REPLICA
-/* PGXC_BEGIN */
- | REPLICATION
-/* PGXC_END */
| RESET
| RESTART
| RESTRICT
| RETURNS
| REVOKE
-/* PGXC_BEGIN */
- | ROBIN
-/* PGXC_END */
| ROLE
| ROLLBACK
-/* PGXC_BEGIN */
- | ROUND
-/* PGXC_END */
| ROWS
| RULE
| SAVEPOINT
diff --git a/src/include/parser/kwlist.h b/src/include/parser/kwlist.h
index d4c8ac6be3..33966987e4 100644
--- a/src/include/parser/kwlist.h
+++ b/src/include/parser/kwlist.h
@@ -184,9 +184,6 @@ PG_KEYWORD("granted", GRANTED, UNRESERVED_KEYWORD)
PG_KEYWORD("greatest", GREATEST, COL_NAME_KEYWORD)
PG_KEYWORD("group", GROUP_P, RESERVED_KEYWORD)
PG_KEYWORD("handler", HANDLER, UNRESERVED_KEYWORD)
-#ifdef PGXC
-PG_KEYWORD("hash", HASH, UNRESERVED_KEYWORD)
-#endif
PG_KEYWORD("having", HAVING, RESERVED_KEYWORD)
PG_KEYWORD("header", HEADER_P, UNRESERVED_KEYWORD)
PG_KEYWORD("hold", HOLD, UNRESERVED_KEYWORD)
@@ -249,9 +246,6 @@ PG_KEYWORD("maxvalue", MAXVALUE, UNRESERVED_KEYWORD)
PG_KEYWORD("minute", MINUTE_P, UNRESERVED_KEYWORD)
PG_KEYWORD("minvalue", MINVALUE, UNRESERVED_KEYWORD)
PG_KEYWORD("mode", MODE, UNRESERVED_KEYWORD)
-#ifdef PGXC
-PG_KEYWORD("modulo", MODULO, UNRESERVED_KEYWORD)
-#endif
PG_KEYWORD("month", MONTH_P, UNRESERVED_KEYWORD)
PG_KEYWORD("move", MOVE, UNRESERVED_KEYWORD)
PG_KEYWORD("name", NAME_P, UNRESERVED_KEYWORD)
@@ -330,9 +324,6 @@ PG_KEYWORD("rename", RENAME, UNRESERVED_KEYWORD)
PG_KEYWORD("repeatable", REPEATABLE, UNRESERVED_KEYWORD)
PG_KEYWORD("replace", REPLACE, UNRESERVED_KEYWORD)
PG_KEYWORD("replica", REPLICA, UNRESERVED_KEYWORD)
-#ifdef PGXC
-PG_KEYWORD("replication", REPLICATION, UNRESERVED_KEYWORD)
-#endif
PG_KEYWORD("reset", RESET, UNRESERVED_KEYWORD)
PG_KEYWORD("restart", RESTART, UNRESERVED_KEYWORD)
PG_KEYWORD("restrict", RESTRICT, UNRESERVED_KEYWORD)
@@ -340,14 +331,8 @@ PG_KEYWORD("returning", RETURNING, RESERVED_KEYWORD)
PG_KEYWORD("returns", RETURNS, UNRESERVED_KEYWORD)
PG_KEYWORD("revoke", REVOKE, UNRESERVED_KEYWORD)
PG_KEYWORD("right", RIGHT, TYPE_FUNC_NAME_KEYWORD)
-#ifdef PGXC
-PG_KEYWORD("robin", ROBIN, UNRESERVED_KEYWORD)
-#endif
PG_KEYWORD("role", ROLE, UNRESERVED_KEYWORD)
PG_KEYWORD("rollback", ROLLBACK, UNRESERVED_KEYWORD)
-#ifdef PGXC
-PG_KEYWORD("round", ROUND, UNRESERVED_KEYWORD)
-#endif
PG_KEYWORD("row", ROW, COL_NAME_KEYWORD)
PG_KEYWORD("rows", ROWS, UNRESERVED_KEYWORD)
PG_KEYWORD("rule", RULE, UNRESERVED_KEYWORD)
diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out
index 687e77ca88..4ad0800f6a 100644
--- a/src/test/regress/expected/alter_table.out
+++ b/src/test/regress/expected/alter_table.out
@@ -677,7 +677,7 @@ insert into atacc1 (test) values (3);
drop table atacc1;
-- let's do one where the unique constraint fails
-- because the column doesn't exist
-create table atacc1 ( test int ) distribute by round robin;
+create table atacc1 ( test int ) distribute by roundrobin;
-- add a unique constraint (fails)
alter table atacc1 add constraint atacc_test1 unique (test1);
ERROR: Cannot locally enforce a unique index on round robin distributed table.
@@ -1212,7 +1212,7 @@ select * from atacc1;
drop table atacc1;
-- test inheritance
-create table parent (a int, b int, c int) distribute by round robin;
+create table parent (a int, b int, c int) distribute by roundrobin;
insert into parent values (1, 2, 3);
alter table parent drop a;
create table child (d varchar(255)) inherits (parent);
@@ -1247,7 +1247,7 @@ select * from child;
drop table child;
drop table parent;
-- test copy in/out
-create table test (a int4, b int4, c int4) distribute by round robin;
+create table test (a int4, b int4, c int4) distribute by roundrobin;
insert into test values (1,2,3);
alter table test drop a;
copy test to stdout;
@@ -1324,8 +1324,8 @@ alter table renameColumn add column w int;
alter table only renameColumn add column x int;
ERROR: column must be added to child tables too
-- Test corner cases in dropping of inherited columns
-create table p1 (f1 int, f2 int) distribute by round robin;
-create table c1 (f1 int not null) inherits(p1) distribute by round robin;
+create table p1 (f1 int, f2 int) distribute by roundrobin;
+create table c1 (f1 int not null) inherits(p1) distribute by roundrobin;
NOTICE: merging column "f1" with inherited definition
-- should be rejected since c1.f1 is inherited
alter table c1 drop column f1;
@@ -1345,8 +1345,8 @@ LINE 1: select f1 from c1;
^
drop table p1 cascade;
NOTICE: drop cascades to table c1
-create table p1 (f1 int, f2 int) distribute by round robin;
-create table c1 () inherits(p1) distribute by round robin;
+create table p1 (f1 int, f2 int) distribute by roundrobin;
+create table c1 () inherits(p1) distribute by roundrobin;
-- should be rejected since c1.f1 is inherited
alter table c1 drop column f1;
ERROR: cannot drop inherited column "f1"
@@ -1358,8 +1358,8 @@ LINE 1: select f1 from c1;
^
drop table p1 cascade;
NOTICE: drop cascades to table c1
-create table p1 (f1 int, f2 int) distribute by round robin;
-create table c1 () inherits(p1) distribute by round robin;
+create table p1 (f1 int, f2 int) distribute by roundrobin;
+create table c1 () inherits(p1) distribute by roundrobin;
-- should be rejected since c1.f1 is inherited
alter table c1 drop column f1;
ERROR: cannot drop inherited column "f1"
@@ -1368,8 +1368,8 @@ alter table only p1 drop column f1;
alter table c1 drop column f1;
drop table p1 cascade;
NOTICE: drop cascades to table c1
-create table p1 (f1 int, f2 int) distribute by round robin;
-create table c1 (f1 int not null) inherits(p1) distribute by round robin;
+create table p1 (f1 int, f2 int) distribute by roundrobin;
+create table c1 (f1 int not null) inherits(p1) distribute by roundrobin;
NOTICE: merging column "f1" with inherited definition
-- should be rejected since c1.f1 is inherited
alter table c1 drop column f1;
diff --git a/src/test/regress/expected/arrays.out b/src/test/regress/expected/arrays.out
index 7aa3756b03..3fd4c79e4d 100644
--- a/src/test/regress/expected/arrays.out
+++ b/src/test/regress/expected/arrays.out
@@ -989,7 +989,7 @@ select 33 = all ('{33,null,33}');
-- test indexes on arrays
-- PGXCTODO: related to feature request 3520520, this distribution type is changed
-- to replication. As integer arrays are no available distribution types, this table
--- should use round robin distribution if nothing is specified but round robin
+-- should use roundrobin distribution if nothing is specified but roundrobin
-- distribution cannot be safely used to check constraints on remote nodes.
-- When global constraints are supported, this replication distribution should be removed.
create temp table arr_tbl (f1 int[] unique) distribute by replication;
diff --git a/src/test/regress/expected/rules.out b/src/test/regress/expected/rules.out
index 15e9c589f1..ef2bb67988 100644
--- a/src/test/regress/expected/rules.out
+++ b/src/test/regress/expected/rules.out
@@ -6,7 +6,7 @@
--
-- Tables and rules for the view test
--
-create table rtest_t1 (a int4, b int4) distribute by round robin;
+create table rtest_t1 (a int4, b int4) distribute by roundrobin;
create table rtest_t2 (a int4, b int4);
create table rtest_t3 (a int4, b int4);
create view rtest_v1 as select * from rtest_t1;
@@ -30,10 +30,10 @@ COMMENT ON RULE rtest_v1_del ON rtest_v1 IS NULL;
-- both possible syntaxes to define them (The last action
-- can but must not have a semicolon at the end).
--
-create table rtest_system (sysname text, sysdesc text) distribute by round robin;
-create table rtest_interface (sysname text, ifname text) distribute by round robin;
-create table rtest_person (pname text, pdesc text) distribute by round robin;
-create table rtest_admin (pname text, sysname text) distribute by round robin;
+create table rtest_system (sysname text, sysdesc text) distribute by roundrobin;
+create table rtest_interface (sysname text, ifname text) distribute by roundrobin;
+create table rtest_person (pname text, pdesc text) distribute by roundrobin;
+create table rtest_admin (pname text, sysname text) distribute by roundrobin;
create rule rtest_sys_upd as on update to rtest_system do also (
update rtest_interface set sysname = new.sysname
where sysname = old.sysname;
@@ -51,9 +51,9 @@ create rule rtest_pers_del as on delete to rtest_person do also
--
-- Tables and rules for the logging test
--
-create table rtest_emp (ename char(20), salary money) distribute by round robin;
-create table rtest_emplog (ename char(20), who name, action char(10), newsal money, oldsal money) distribute by round robin;
-create table rtest_empmass (ename char(20), salary money) distribute by round robin;
+create table rtest_emp (ename char(20), salary money) distribute by roundrobin;
+create table rtest_emplog (ename char(20), who name, action char(10), newsal money, oldsal money) distribute by roundrobin;
+create table rtest_empmass (ename char(20), salary money) distribute by roundrobin;
create rule rtest_emp_ins as on insert to rtest_emp do
insert into rtest_emplog values (new.ename, current_user,
'hired', new.salary, '0.00');
@@ -941,18 +941,18 @@ CREATE TABLE shoe_data (
slminlen float, -- miminum shoelace length
slmaxlen float, -- maximum shoelace length
slunit char(8) -- length unit
-) distribute by round robin;
+) distribute by roundrobin;
CREATE TABLE shoelace_data (
sl_name char(10), -- primary key
sl_avail integer, -- available # of pairs
sl_color char(10), -- shoelace color
sl_len float, -- shoelace length
sl_unit char(8) -- length unit
-) distribute by round robin;
+) distribute by roundrobin;
CREATE TABLE unit (
un_name char(8), -- the primary key
un_fact float -- factor to transform to cm
-) distribute by round robin;
+) distribute by roundrobin;
CREATE VIEW shoe AS
SELECT sh.shoename,
sh.sh_avail,
diff --git a/src/test/regress/expected/xc_FQS.out b/src/test/regress/expected/xc_FQS.out
index c7ceee61f4..5b3cc07609 100644
--- a/src/test/regress/expected/xc_FQS.out
+++ b/src/test/regress/expected/xc_FQS.out
@@ -3,8 +3,8 @@
--
-- This file contains tests for Fast Query Shipping (FQS) for queries involving
-- a single table
--- Testset 1 for distributed table (by round robin)
-select create_table_nodes('tab1_rr(val int, val2 int)', '{1, 2, 3}'::int[], 'round robin', NULL);
+-- Testset 1 for distributed table (by roundrobin)
+select create_table_nodes('tab1_rr(val int, val2 int)', '{1, 2, 3}'::int[], 'roundrobin', NULL);
create_table_nodes
--------------------
@@ -187,7 +187,7 @@ explain (costs off, verbose on, nodes off) select sum(val) from tab1_rr where va
Remote query: SELECT sum(val), val2 FROM ONLY tab1_rr WHERE (val2 = 2) GROUP BY val2
(6 rows)
--- tests for node reduction by application of quals, for round robin node
+-- tests for node reduction by application of quals, for roundrobin node
-- reduction is not applicable. Having query not FQSed because of existence of ORDER BY,
-- implies that nodes did not get reduced.
select * from tab1_rr where val = 7;
diff --git a/src/test/regress/expected/xc_alter_table.out b/src/test/regress/expected/xc_alter_table.out
index 1e923735ed..bfe4b505a8 100644
--- a/src/test/regress/expected/xc_alter_table.out
+++ b/src/test/regress/expected/xc_alter_table.out
@@ -304,7 +304,7 @@ SELECT b FROM xc_alter_table_3 WHERE a = 11 or a = 12;
(0 rows)
EXECUTE xc_alter_table_delete(12);
-ALTER TABLE xc_alter_table_3 DISTRIBUTE BY ROUND ROBIN;
+ALTER TABLE xc_alter_table_3 DISTRIBUTE BY ROUNDROBIN;
SELECT count(*), sum(a), avg(a) FROM xc_alter_table_3; -- Check on tuple presence
count | sum | avg
-------+-----+--------------------
diff --git a/src/test/regress/expected/xc_distkey.out b/src/test/regress/expected/xc_distkey.out
index f7deeaf0dd..3d732491cd 100644
--- a/src/test/regress/expected/xc_distkey.out
+++ b/src/test/regress/expected/xc_distkey.out
@@ -616,7 +616,7 @@ select * from tstz_tab_h where a = 'Jun 23, 2001 23:59:59.99 PST';
Sun Jun 24 00:59:59.99 2001 PDT
(1 row)
-create table my_rr_tab(a integer, b varchar(100)) distribute by round robin;
+create table my_rr_tab(a integer, b varchar(100)) distribute by roundrobin;
insert into my_rr_tab values(1 , 'One');
insert into my_rr_tab values(2, 'Two');
select * from my_rr_tab order by a;
diff --git a/src/test/regress/expected/xc_remote.out b/src/test/regress/expected/xc_remote.out
index 4afd26ece3..fed4f593f4 100644
--- a/src/test/regress/expected/xc_remote.out
+++ b/src/test/regress/expected/xc_remote.out
@@ -11,7 +11,7 @@ CREATE FUNCTION func_immutable (int) RETURNS int AS $$ SELECT $1 $$ LANGUAGE SQL
-- Test for remote DML on different tables
CREATE TABLE rel_rep (a int, b int) DISTRIBUTE BY REPLICATION;
CREATE TABLE rel_hash (a int, b int) DISTRIBUTE BY HASH (a);
-CREATE TABLE rel_rr (a int, b int) DISTRIBUTE BY ROUND ROBIN;
+CREATE TABLE rel_rr (a int, b int) DISTRIBUTE BY ROUNDROBIN;
CREATE SEQUENCE seqtest START 10;
CREATE SEQUENCE seqtest2 START 100;
-- INSERT cases
@@ -202,9 +202,9 @@ SELECT a FROM rel_rep WHERE c = true ORDER BY 1;
(1 row)
DROP SEQUENCE seqtest3;
--- UPDATE cases for round robin table
+-- UPDATE cases for roundrobin table
-- Plain cases change it completely
-CREATE TABLE rel_rr (a int, b timestamp DEFAULT NULL, c boolean DEFAULT NULL) DISTRIBUTE BY ROUND ROBIN;
+CREATE TABLE rel_rr (a int, b timestamp DEFAULT NULL, c boolean DEFAULT NULL) DISTRIBUTE BY ROUNDROBIN;
CREATE SEQUENCE seqtest4 START 1;
INSERT INTO rel_rr VALUES (1),(2),(3),(4),(5);
UPDATE rel_rr SET a = nextval('seqtest4'), b = now(), c = false;
diff --git a/src/test/regress/expected/xc_sequence.out b/src/test/regress/expected/xc_sequence.out
index 6927847757..222519102d 100644
--- a/src/test/regress/expected/xc_sequence.out
+++ b/src/test/regress/expected/xc_sequence.out
@@ -98,7 +98,7 @@ SELECT nextval('xc_sequence_2'); -- ok
DROP SEQUENCE xc_sequence_2;
-- Columns with SERIAL
-- Serial sequence is named xc_sequence_tab1_col2_seq
-CREATE TABLE xc_sequence_tab1 (col1 int, col2 serial) DISTRIBUTE BY ROUND ROBIN;
+CREATE TABLE xc_sequence_tab1 (col1 int, col2 serial) DISTRIBUTE BY ROUNDROBIN;
NOTICE: CREATE TABLE will create implicit sequence "xc_sequence_tab1_col2_seq" for serial column "xc_sequence_tab1.col2"
-- Some data
INSERT INTO xc_sequence_tab1 VALUES (1, DEFAULT);
@@ -144,7 +144,7 @@ SELECT col1 FROM xc_sequence_tab1 ORDER BY 1;
COMMIT;
DROP TABLE xc_sequence_tab1;
-- Need to recreate here, serial column is no more
-CREATE TABLE xc_sequence_tab1 (col1 int, col2 serial) DISTRIBUTE BY ROUND ROBIN;
+CREATE TABLE xc_sequence_tab1 (col1 int, col2 serial) DISTRIBUTE BY ROUNDROBIN;
NOTICE: CREATE TABLE will create implicit sequence "xc_sequence_tab1_col2_seq" for serial column "xc_sequence_tab1.col2"
INSERT INTO xc_sequence_tab1 VALUES (1234, DEFAULT);
SELECT col1, col2 FROM xc_sequence_tab1 ORDER BY 1;
diff --git a/src/test/regress/expected/xc_temp.out b/src/test/regress/expected/xc_temp.out
index 1dceba364a..d4ca7125ec 100644
--- a/src/test/regress/expected/xc_temp.out
+++ b/src/test/regress/expected/xc_temp.out
@@ -6,10 +6,10 @@ SET enforce_two_phase_commit TO off;
-- Create TEMPORARY and normal tables
CREATE TABLE table_rep (a int, b_rep char(1)) DISTRIBUTE BY REPLICATION;
CREATE TABLE table_hash (a int, b_hash char(1)) DISTRIBUTE BY HASH(a);
-CREATE TABLE table_rb (a int, b_rb char(1)) DISTRIBUTE BY ROUND ROBIN;
+CREATE TABLE table_rb (a int, b_rb char(1)) DISTRIBUTE BY ROUNDROBIN;
CREATE TEMP TABLE temptable_rep (a int, b_tprep char(1)) DISTRIBUTE BY REPLICATION;
CREATE TEMP TABLE temptable_hash (a int, b_tphash char(1)) DISTRIBUTE BY HASH(a);
-CREATE TEMP TABLE temptable_rb (a int, b_tprb char(1)) DISTRIBUTE BY ROUND ROBIN;
+CREATE TEMP TABLE temptable_rb (a int, b_tprb char(1)) DISTRIBUTE BY ROUNDROBIN;
INSERT INTO table_rep VALUES (1, 'a');
INSERT INTO table_rep VALUES (2, 'b');
INSERT INTO table_rep VALUES (3, 'c');
diff --git a/src/test/regress/sql/alter_table.sql b/src/test/regress/sql/alter_table.sql
index 675a6be9a9..651961ec71 100644
--- a/src/test/regress/sql/alter_table.sql
+++ b/src/test/regress/sql/alter_table.sql
@@ -542,7 +542,7 @@ drop table atacc1;
-- let's do one where the unique constraint fails
-- because the column doesn't exist
-create table atacc1 ( test int ) distribute by round robin;
+create table atacc1 ( test int ) distribute by roundrobin;
-- add a unique constraint (fails)
alter table atacc1 add constraint atacc_test1 unique (test1);
drop table atacc1;
@@ -877,7 +877,7 @@ select * from atacc1;
drop table atacc1;
-- test inheritance
-create table parent (a int, b int, c int) distribute by round robin;
+create table parent (a int, b int, c int) distribute by roundrobin;
insert into parent values (1, 2, 3);
alter table parent drop a;
create table child (d varchar(255)) inherits (parent);
@@ -893,7 +893,7 @@ drop table child;
drop table parent;
-- test copy in/out
-create table test (a int4, b int4, c int4) distribute by round robin;
+create table test (a int4, b int4, c int4) distribute by roundrobin;
insert into test values (1,2,3);
alter table test drop a;
copy test to stdout;
@@ -958,8 +958,8 @@ alter table only renameColumn add column x int;
-- Test corner cases in dropping of inherited columns
-create table p1 (f1 int, f2 int) distribute by round robin;
-create table c1 (f1 int not null) inherits(p1) distribute by round robin;
+create table p1 (f1 int, f2 int) distribute by roundrobin;
+create table c1 (f1 int not null) inherits(p1) distribute by roundrobin;
-- should be rejected since c1.f1 is inherited
alter table c1 drop column f1;
@@ -972,8 +972,8 @@ select f1 from c1;
drop table p1 cascade;
-create table p1 (f1 int, f2 int) distribute by round robin;
-create table c1 () inherits(p1) distribute by round robin;
+create table p1 (f1 int, f2 int) distribute by roundrobin;
+create table c1 () inherits(p1) distribute by roundrobin;
-- should be rejected since c1.f1 is inherited
alter table c1 drop column f1;
@@ -983,8 +983,8 @@ select f1 from c1;
drop table p1 cascade;
-create table p1 (f1 int, f2 int) distribute by round robin;
-create table c1 () inherits(p1) distribute by round robin;
+create table p1 (f1 int, f2 int) distribute by roundrobin;
+create table c1 () inherits(p1) distribute by roundrobin;
-- should be rejected since c1.f1 is inherited
alter table c1 drop column f1;
@@ -994,8 +994,8 @@ alter table c1 drop column f1;
drop table p1 cascade;
-create table p1 (f1 int, f2 int) distribute by round robin;
-create table c1 (f1 int not null) inherits(p1) distribute by round robin;
+create table p1 (f1 int, f2 int) distribute by roundrobin;
+create table c1 (f1 int not null) inherits(p1) distribute by roundrobin;
-- should be rejected since c1.f1 is inherited
alter table c1 drop column f1;
diff --git a/src/test/regress/sql/arrays.sql b/src/test/regress/sql/arrays.sql
index 76352ee6ad..ad3c265e21 100644
--- a/src/test/regress/sql/arrays.sql
+++ b/src/test/regress/sql/arrays.sql
@@ -270,7 +270,7 @@ select 33 = all ('{33,null,33}');
-- test indexes on arrays
-- PGXCTODO: related to feature request 3520520, this distribution type is changed
-- to replication. As integer arrays are no available distribution types, this table
--- should use round robin distribution if nothing is specified but round robin
+-- should use roundrobin distribution if nothing is specified but roundrobin
-- distribution cannot be safely used to check constraints on remote nodes.
-- When global constraints are supported, this replication distribution should be removed.
create temp table arr_tbl (f1 int[] unique) distribute by replication;
diff --git a/src/test/regress/sql/inherit.sql b/src/test/regress/sql/inherit.sql
index bf486b629c..571244fa64 100644
--- a/src/test/regress/sql/inherit.sql
+++ b/src/test/regress/sql/inherit.sql
@@ -5,10 +5,10 @@
-- Enforce use of COMMIT instead of 2PC for temporary objects
SET enforce_two_phase_commit TO off;
-CREATE TABLE a (aa TEXT) distribute by round robin;
-CREATE TABLE b (bb TEXT) INHERITS (a) distribute by round robin;
-CREATE TABLE c (cc TEXT) INHERITS (a) distribute by round robin;
-CREATE TABLE d (dd TEXT) INHERITS (b,c,a) distribute by round robin;
+CREATE TABLE a (aa TEXT) distribute by roundrobin;
+CREATE TABLE b (bb TEXT) INHERITS (a) distribute by roundrobin;
+CREATE TABLE c (cc TEXT) INHERITS (a) distribute by roundrobin;
+CREATE TABLE d (dd TEXT) INHERITS (b,c,a) distribute by roundrobin;
INSERT INTO a(aa) VALUES('aaa');
INSERT INTO a(aa) VALUES('aaaa');
diff --git a/src/test/regress/sql/plpgsql.sql b/src/test/regress/sql/plpgsql.sql
index 6981179288..8ca190c72c 100644
--- a/src/test/regress/sql/plpgsql.sql
+++ b/src/test/regress/sql/plpgsql.sql
@@ -1443,7 +1443,7 @@ SELECT recursion_test(4,3);
--
-- Test the FOUND magic variable
--
-CREATE TABLE found_test_tbl (a int) distribute by round robin;
+CREATE TABLE found_test_tbl (a int) distribute by roundrobin;
create function test_found()
returns boolean as '
diff --git a/src/test/regress/sql/rules.sql b/src/test/regress/sql/rules.sql
index 80b3cc0713..8b1d00146b 100644
--- a/src/test/regress/sql/rules.sql
+++ b/src/test/regress/sql/rules.sql
@@ -7,7 +7,7 @@
--
-- Tables and rules for the view test
--
-create table rtest_t1 (a int4, b int4) distribute by round robin;
+create table rtest_t1 (a int4, b int4) distribute by roundrobin;
create table rtest_t2 (a int4, b int4);
create table rtest_t3 (a int4, b int4);
@@ -31,10 +31,10 @@ COMMENT ON RULE rtest_v1_del ON rtest_v1 IS NULL;
-- both possible syntaxes to define them (The last action
-- can but must not have a semicolon at the end).
--
-create table rtest_system (sysname text, sysdesc text) distribute by round robin;
-create table rtest_interface (sysname text, ifname text) distribute by round robin;
-create table rtest_person (pname text, pdesc text) distribute by round robin;
-create table rtest_admin (pname text, sysname text) distribute by round robin;
+create table rtest_system (sysname text, sysdesc text) distribute by roundrobin;
+create table rtest_interface (sysname text, ifname text) distribute by roundrobin;
+create table rtest_person (pname text, pdesc text) distribute by roundrobin;
+create table rtest_admin (pname text, sysname text) distribute by roundrobin;
create rule rtest_sys_upd as on update to rtest_system do also (
update rtest_interface set sysname = new.sysname
@@ -57,9 +57,9 @@ create rule rtest_pers_del as on delete to rtest_person do also
--
-- Tables and rules for the logging test
--
-create table rtest_emp (ename char(20), salary money) distribute by round robin;
-create table rtest_emplog (ename char(20), who name, action char(10), newsal money, oldsal money) distribute by round robin;
-create table rtest_empmass (ename char(20), salary money) distribute by round robin;
+create table rtest_emp (ename char(20), salary money) distribute by roundrobin;
+create table rtest_emplog (ename char(20), who name, action char(10), newsal money, oldsal money) distribute by roundrobin;
+create table rtest_empmass (ename char(20), salary money) distribute by roundrobin;
create rule rtest_emp_ins as on insert to rtest_emp do
insert into rtest_emplog values (new.ename, current_user,
@@ -525,7 +525,7 @@ CREATE TABLE shoe_data (
slminlen float, -- miminum shoelace length
slmaxlen float, -- maximum shoelace length
slunit char(8) -- length unit
-) distribute by round robin;
+) distribute by roundrobin;
CREATE TABLE shoelace_data (
sl_name char(10), -- primary key
@@ -533,12 +533,12 @@ CREATE TABLE shoelace_data (
sl_color char(10), -- shoelace color
sl_len float, -- shoelace length
sl_unit char(8) -- length unit
-) distribute by round robin;
+) distribute by roundrobin;
CREATE TABLE unit (
un_name char(8), -- the primary key
un_fact float -- factor to transform to cm
-) distribute by round robin;
+) distribute by roundrobin;
CREATE VIEW shoe AS
SELECT sh.shoename,
diff --git a/src/test/regress/sql/xc_FQS.sql b/src/test/regress/sql/xc_FQS.sql
index c36179fa01..3034390373 100644
--- a/src/test/regress/sql/xc_FQS.sql
+++ b/src/test/regress/sql/xc_FQS.sql
@@ -5,8 +5,8 @@
-- This file contains tests for Fast Query Shipping (FQS) for queries involving
-- a single table
--- Testset 1 for distributed table (by round robin)
-select create_table_nodes('tab1_rr(val int, val2 int)', '{1, 2, 3}'::int[], 'round robin', NULL);
+-- Testset 1 for distributed table (by roundrobin)
+select create_table_nodes('tab1_rr(val int, val2 int)', '{1, 2, 3}'::int[], 'roundrobin', NULL);
insert into tab1_rr values (1, 2);
insert into tab1_rr values (2, 4);
insert into tab1_rr values (5, 3);
@@ -42,7 +42,7 @@ explain (costs off, verbose on, nodes off) select val, val2 from tab1_rr where v
select sum(val) from tab1_rr where val2 = 2 group by val2 having sum(val) > 1;
explain (costs off, verbose on, nodes off) select sum(val) from tab1_rr where val2 = 2 group by val2 having sum(val) > 1;
--- tests for node reduction by application of quals, for round robin node
+-- tests for node reduction by application of quals, for roundrobin node
-- reduction is not applicable. Having query not FQSed because of existence of ORDER BY,
-- implies that nodes did not get reduced.
select * from tab1_rr where val = 7;
diff --git a/src/test/regress/sql/xc_alter_table.sql b/src/test/regress/sql/xc_alter_table.sql
index febfcc2cd9..ba1bdfd938 100644
--- a/src/test/regress/sql/xc_alter_table.sql
+++ b/src/test/regress/sql/xc_alter_table.sql
@@ -102,7 +102,7 @@ SELECT b FROM xc_alter_table_3 WHERE a = 11;
EXECUTE xc_alter_table_delete(11);
SELECT b FROM xc_alter_table_3 WHERE a = 11 or a = 12;
EXECUTE xc_alter_table_delete(12);
-ALTER TABLE xc_alter_table_3 DISTRIBUTE BY ROUND ROBIN;
+ALTER TABLE xc_alter_table_3 DISTRIBUTE BY ROUNDROBIN;
SELECT count(*), sum(a), avg(a) FROM xc_alter_table_3; -- Check on tuple presence
SELECT * FROM xc_alter_table_3_v;
EXECUTE xc_alter_table_insert(11, 'b');
diff --git a/src/test/regress/sql/xc_distkey.sql b/src/test/regress/sql/xc_distkey.sql
index e3f5849c24..ef8838135c 100644
--- a/src/test/regress/sql/xc_distkey.sql
+++ b/src/test/regress/sql/xc_distkey.sql
@@ -244,7 +244,7 @@ select * from tstz_tab_h where a = 'May 10, 2011 00:01:02.03 PST';
select * from tstz_tab_h where a = 'Jun 23, 2001 23:59:59.99 PST';
-create table my_rr_tab(a integer, b varchar(100)) distribute by round robin;
+create table my_rr_tab(a integer, b varchar(100)) distribute by roundrobin;
insert into my_rr_tab values(1 , 'One');
insert into my_rr_tab values(2, 'Two');
diff --git a/src/test/regress/sql/xc_remote.sql b/src/test/regress/sql/xc_remote.sql
index 1369c57e8b..d8d742ad8a 100644
--- a/src/test/regress/sql/xc_remote.sql
+++ b/src/test/regress/sql/xc_remote.sql
@@ -14,7 +14,7 @@ CREATE FUNCTION func_immutable (int) RETURNS int AS $$ SELECT $1 $$ LANGUAGE SQL
-- Test for remote DML on different tables
CREATE TABLE rel_rep (a int, b int) DISTRIBUTE BY REPLICATION;
CREATE TABLE rel_hash (a int, b int) DISTRIBUTE BY HASH (a);
-CREATE TABLE rel_rr (a int, b int) DISTRIBUTE BY ROUND ROBIN;
+CREATE TABLE rel_rr (a int, b int) DISTRIBUTE BY ROUNDROBIN;
CREATE SEQUENCE seqtest START 10;
CREATE SEQUENCE seqtest2 START 100;
@@ -81,9 +81,9 @@ UPDATE rel_rep SET b = now(), c = true WHERE a < currval('seqtest3') - 3 AND b <
SELECT a FROM rel_rep WHERE c = true ORDER BY 1;
DROP SEQUENCE seqtest3;
--- UPDATE cases for round robin table
+-- UPDATE cases for roundrobin table
-- Plain cases change it completely
-CREATE TABLE rel_rr (a int, b timestamp DEFAULT NULL, c boolean DEFAULT NULL) DISTRIBUTE BY ROUND ROBIN;
+CREATE TABLE rel_rr (a int, b timestamp DEFAULT NULL, c boolean DEFAULT NULL) DISTRIBUTE BY ROUNDROBIN;
CREATE SEQUENCE seqtest4 START 1;
INSERT INTO rel_rr VALUES (1),(2),(3),(4),(5);
UPDATE rel_rr SET a = nextval('seqtest4'), b = now(), c = false;
diff --git a/src/test/regress/sql/xc_sequence.sql b/src/test/regress/sql/xc_sequence.sql
index 0c731df967..7a929dab34 100644
--- a/src/test/regress/sql/xc_sequence.sql
+++ b/src/test/regress/sql/xc_sequence.sql
@@ -48,7 +48,7 @@ DROP SEQUENCE xc_sequence_2;
-- Columns with SERIAL
-- Serial sequence is named xc_sequence_tab1_col2_seq
-CREATE TABLE xc_sequence_tab1 (col1 int, col2 serial) DISTRIBUTE BY ROUND ROBIN;
+CREATE TABLE xc_sequence_tab1 (col1 int, col2 serial) DISTRIBUTE BY ROUNDROBIN;
-- Some data
INSERT INTO xc_sequence_tab1 VALUES (1, DEFAULT);
INSERT INTO xc_sequence_tab1 VALUES (2, DEFAULT);
@@ -68,7 +68,7 @@ SELECT col1 FROM xc_sequence_tab1 ORDER BY 1;
COMMIT;
DROP TABLE xc_sequence_tab1;
-- Need to recreate here, serial column is no more
-CREATE TABLE xc_sequence_tab1 (col1 int, col2 serial) DISTRIBUTE BY ROUND ROBIN;
+CREATE TABLE xc_sequence_tab1 (col1 int, col2 serial) DISTRIBUTE BY ROUNDROBIN;
INSERT INTO xc_sequence_tab1 VALUES (1234, DEFAULT);
SELECT col1, col2 FROM xc_sequence_tab1 ORDER BY 1;
-- Rollback of a table with SERIAL
diff --git a/src/test/regress/sql/xc_temp.sql b/src/test/regress/sql/xc_temp.sql
index 7b65d2a347..17944a3a51 100644
--- a/src/test/regress/sql/xc_temp.sql
+++ b/src/test/regress/sql/xc_temp.sql
@@ -8,10 +8,10 @@ SET enforce_two_phase_commit TO off;
-- Create TEMPORARY and normal tables
CREATE TABLE table_rep (a int, b_rep char(1)) DISTRIBUTE BY REPLICATION;
CREATE TABLE table_hash (a int, b_hash char(1)) DISTRIBUTE BY HASH(a);
-CREATE TABLE table_rb (a int, b_rb char(1)) DISTRIBUTE BY ROUND ROBIN;
+CREATE TABLE table_rb (a int, b_rb char(1)) DISTRIBUTE BY ROUNDROBIN;
CREATE TEMP TABLE temptable_rep (a int, b_tprep char(1)) DISTRIBUTE BY REPLICATION;
CREATE TEMP TABLE temptable_hash (a int, b_tphash char(1)) DISTRIBUTE BY HASH(a);
-CREATE TEMP TABLE temptable_rb (a int, b_tprb char(1)) DISTRIBUTE BY ROUND ROBIN;
+CREATE TEMP TABLE temptable_rb (a int, b_tprb char(1)) DISTRIBUTE BY ROUNDROBIN;
INSERT INTO table_rep VALUES (1, 'a');
INSERT INTO table_rep VALUES (2, 'b');
INSERT INTO table_rep VALUES (3, 'c');