Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MERGE PG13][#14509]YSQL: Fix merge conflict occuring while checking …
…the condition for creating a primary key index Summary: The attribute `yb_is_add_primary_key` was created as part of the `AlterTableCmd` struct to indicate this alter command is for adding primary key. In the past, there were 2 subcommands involved when creating a primary key: 1) `AddIndex` 2) `SetNotNull` (only if any one of the primary key attributes are not set as NOT NULL). In PG13, setting the primary key columns to NOT NULL is triggered in a separate API called `transformIndexConstraint`. The boolean flag has been set in the corresponding section where `AlterTableCmd` is prepared to alter the primary key column to be not null. Here is the excerpt from the PG13 comment mentioning the need to satisfy NOT NULL requirement prior to creating primary key index: ```Now we expect that the parser inserted any required ALTER TABLE SET NOT NULL operations before trying to create a primary-key index.``` Test Plan: Jenkins Reviewers: neil, myang Reviewed By: myang Subscribers: yql Differential Revision: https://phabricator.dev.yugabyte.com/D21331
- Loading branch information