@@ -716,7 +716,7 @@ usage(void)
716716 " -q, --quiet quiet logging (one message each 5 seconds)\n"
717717 " -s, --scale=NUM scaling factor\n"
718718 " --foreign-keys create foreign key constraints between tables\n"
719- " --use-unique-keys make the indexes that are created non-unique indexes\n"
719+ " --use-non- unique-keys make the indexes that are created non-unique indexes\n"
720720 " (default: unique)\n"
721721 " --index-tablespace=TABLESPACE\n"
722722 " create indexes in the specified tablespace\n"
@@ -4382,7 +4382,11 @@ initCreatePKeys(PGconn *con)
43824382 int i ;
43834383 PQExpBufferData query ;
43844384
4385- fprintf (stderr , "creating primary keys...\n" );
4385+ if (use_unique_key )
4386+ fprintf (stderr , "creating primary keys...\n" );
4387+ else
4388+ fprintf (stderr , "creating non-unique keys...\n" );
4389+
43864390 initPQExpBuffer (& query );
43874391
43884392 for (i = 0 ; i < lengthof (DDLINDEXes ); i ++ )
@@ -5837,7 +5841,8 @@ main(int argc, char **argv)
58375841 {"show-script" , required_argument , NULL , 10 },
58385842 {"partitions" , required_argument , NULL , 11 },
58395843 {"partition-method" , required_argument , NULL , 12 },
5840- {"use-unique-keys" , no_argument , & use_unique_key , 1 },
5844+ /* Cloudberry-specific */
5845+ {"use-non-unique-keys" , no_argument , NULL , 13 },
58415846 {NULL , 0 , NULL , 0 }
58425847 };
58435848
@@ -6217,6 +6222,9 @@ main(int argc, char **argv)
62176222 exit (1 );
62186223 }
62196224 break ;
6225+ case 13 :
6226+ use_unique_key = 0 ;
6227+ break ;
62206228 default :
62216229 fprintf (stderr , _ ("Try \"%s --help\" for more information.\n" ), progname );
62226230 exit (1 );
0 commit comments