Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PG15] Restore missing space for ADD CONSTRAINT UNIQUE USING
Summary: Bad [[ yugabyte@7e541a1 | merge ]]. The master branch [[ https://github.com/yugabyte/yugabyte-db/blob/1a28aadaae5c5fdb11e24256fcc68ec00ca04051/src/postgres/src/bin/pg_dump/pg_dump.c#L17141 | contains this space]]. When this space isn't generated, `ysql_dump` generates output that says `UNIQUEUSING`, which is not valid SQL, instead of `UNIQUE USING`. Here is what the broken behavior looks like in context. ``` ALTER TABLE ONLY public.p1 ADD CONSTRAINT c1 UNIQUEUSING INDEX c1; ``` Test Plan: In `ysqlsh`: ``` CREATE TABLE p1 (k INT PRIMARY KEY, v TEXT); CREATE UNIQUE INDEX c1 ON p1 (v ASC) SPLIT AT VALUES (('foo'), ('qux')); ALTER TABLE p1 ADD UNIQUE USING INDEX c1; ``` Then: ``` build/latest/postgres/bin/ysql_dump --include-yb-metadata ``` Reviewers: jason Reviewed By: jason Subscribers: smishra, yql Differential Revision: https://phorge.dev.yugabyte.com/D29536
- Loading branch information