Skip to content

Commit

Permalink
Allow parallel clause in ADD CONSTRAINT clause (#4258)
Browse files Browse the repository at this point in the history
  • Loading branch information
vjuranek authored Sep 27, 2024
1 parent 58f7d04 commit 42da5d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion sql/plsql/PlSqlParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -2783,7 +2783,9 @@ out_of_line_constraint
| foreign_key_clause
| CHECK '(' condition ')'
)
) constraint_state?
)
constraint_state?
parallel_clause?
;

constraint_state
Expand Down
4 changes: 3 additions & 1 deletion sql/plsql/examples/alter_table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,6 @@ SPLIT PARTITION TABLE_NAME_CURRENT AT (TO_DATE('20240116040241', 'YYYYMMDDHH24MI
INTO (PARTITION TABLE_NAME_20240116040241, PARTITION TABLE_NAME_CURRENT)
UPDATE INDEXES (COST_IX (PARTITION C_P1 TABLESPACE TBS_02, PARTITION C_P2 TABLESPACE TBS_03));

ALTER TABLE "AB01"."SMOSTAMM" ADD CONSTRAINT "CC_SMOSTAMM_KRAB" CHECK ((KRAB >= 0. ) AND (KRAB <= 100. )) ENABLE;
ALTER TABLE "AB01"."SMOSTAMM" ADD CONSTRAINT "CC_SMOSTAMM_KRAB" CHECK ((KRAB >= 0. ) AND (KRAB <= 100. )) ENABLE;

ALTER TABLE "ME_CARRIER_HISTORY" ADD CONSTRAINT "CHECK_COMM_TYPE" CHECK (communication_type in('EDI','NON-EDI','API')) NOVALIDATE PARALLEL;

0 comments on commit 42da5d4

Please sign in to comment.