From 9e146f3ecc9322777f7b3c5bd0ede49fd843a0ee Mon Sep 17 00:00:00 2001 From: Marco Slot Date: Tue, 19 May 2020 22:34:54 +0200 Subject: [PATCH] Make column order in stock_i1 index in PostgreSQL consistent with Oracle (#124) Co-authored-by: Marco Slot Accepting pull request as voted on May 19, 2020 in the TPC-OSS subcommittee. --- src/postgresql/pgoltp.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/postgresql/pgoltp.tcl b/src/postgresql/pgoltp.tcl index ac73eb5c..9cb28b85 100755 --- a/src/postgresql/pgoltp.tcl +++ b/src/postgresql/pgoltp.tcl @@ -1653,7 +1653,7 @@ set sql(5) "ALTER TABLE ITEM ADD CONSTRAINT ITEM_I1 PRIMARY KEY (I_ID)" set sql(6) "ALTER TABLE ORDERS ADD CONSTRAINT ORDERS_I1 PRIMARY KEY (O_W_ID, O_D_ID, O_ID)" set sql(7) "CREATE UNIQUE INDEX ORDERS_I2 ON ORDERS (O_W_ID, O_D_ID, O_C_ID, O_ID)" set sql(8) "ALTER TABLE ORDER_LINE ADD CONSTRAINT ORDER_LINE_I1 PRIMARY KEY (OL_W_ID, OL_D_ID, OL_O_ID, OL_NUMBER)" -set sql(9) "ALTER TABLE STOCK ADD CONSTRAINT STOCK_I1 PRIMARY KEY (S_W_ID, S_I_ID)" +set sql(9) "ALTER TABLE STOCK ADD CONSTRAINT STOCK_I1 PRIMARY KEY (S_I_ID, S_W_ID)" set sql(10) "ALTER TABLE WAREHOUSE ADD CONSTRAINT WAREHOUSE_I1 PRIMARY KEY (W_ID) WITH (FILLFACTOR = 100)" for { set i 1 } { $i <= 10 } { incr i } { set result [ pg_exec $lda $sql($i) ]