Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[YSQL] Enable support for ALTER VIEW #23117

Closed
1 task done
fizaaluthra opened this issue Jul 3, 2024 · 1 comment
Closed
1 task done

[YSQL] Enable support for ALTER VIEW #23117

fizaaluthra opened this issue Jul 3, 2024 · 1 comment
Assignees
Labels
2024.1 Backport Required area/ysql Yugabyte SQL (YSQL) kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue

Comments

@fizaaluthra
Copy link
Member

fizaaluthra commented Jul 3, 2024

Jira Link: DB-12050

Description

Parser change + import tests.

Issue Type

kind/enhancement

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.
@fizaaluthra fizaaluthra added area/ysql Yugabyte SQL (YSQL) status/awaiting-triage Issue awaiting triage labels Jul 3, 2024
@fizaaluthra fizaaluthra self-assigned this Jul 3, 2024
@yugabyte-ci yugabyte-ci added kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue and removed status/awaiting-triage Issue awaiting triage labels Jul 3, 2024
fizaaluthra added a commit that referenced this issue Aug 8, 2024
Summary:
With this diff, the following ALTER VIEW commands are allowed:

  - ALTER VIEW [ IF EXISTS ] name ALTER [ COLUMN ] column_name SET DEFAULT expression
  - ALTER VIEW [ IF EXISTS ] name ALTER [ COLUMN ] column_name DROP DEFAULT
  - ALTER VIEW [ IF EXISTS ] name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
  - ALTER VIEW [ IF EXISTS ] name RENAME TO new_name
  - ALTER VIEW [ IF EXISTS ] name SET SCHEMA new_schema

These commands do not require any additional YB changes, as they are metadata-only changes. Therefore, we only need to enable them in the parser.

Note: ALTER VIEW ... SET/RESET commands are not enabled as the generalized ALTER TABLE ... SET/RESET is not supported.
Jira: DB-12050

Test Plan: yb_view, yb_pg_create_view

Reviewers: myang, jason

Reviewed By: myang

Subscribers: jason, yql

Differential Revision: https://phorge.dev.yugabyte.com/D35937
jasonyb pushed a commit that referenced this issue Aug 9, 2024
Summary:
 43d4b49 [PLAT-14771]: Restrict user actions on releases page based on appropriate RBAC permissions
 1473a23 [PLAT-14792]: Master and TServer nodes displays empty tool tip if nodes are unreachable
 Excluded: 78a2bc7 [#23114] YSQL: Refactoring the yb_pg_pgaudit.sql/.out test.
 da9b281 [doc][ybm] Prometheus integration (#23292)
 bd4874b [#13358] YSQL: Fix DDL atomicity stress test failure in tsan build
 edd8e3f [PLAT-14524] Undo all @JsonProperty annotations added earlier to fix APIs
 Excluded: 4a2657e [PLAT-14787] Implement a master tablet lb api for YW
 b9d2e9d [#23445]yugabyted: Node not starting with DNS name and `--secure` option
 f171e13 [#23447]yugabyted: Node doesn't restart with `--secure` enabled
 d4f036d [PLAT-14790] Region metadata is not populated when provisioned nodes are added via Node Agent when using assisted Manual Provisioning (provision_instance.py script)
 71ab66f [doc][ybm] Backup and restore clarifications (#23400)
 4768023 [doc] ysql_yb_bnl_batch_size flag (#23397)
 3d4bc2a [#23117] YSQL: Enable ALTER VIEW in parser
 Excluded: 03bbbed Bumping version to 2.23.1.0 on branch master
 622046d [#23335] DocDB: Set field close timestamp for the log segment being copied
 Excluded: f69b08f [#1999] YSQL: fix temp table INSERT ON CONFLICT
 Excluded: efd4cb7 [#23429] YSQL: fix INSERT ON CONFLICT TupleDesc ref leak
 Excluded: 9e7181f [PLAT-14785] Add REST APIs for job scheduler (auto-master failover)
 d56903c [PLAT-14850]API Token authentication loops through the users and checks token against each of these.

Test Plan: Jenkins: rebase: pg15-cherrypicks

Reviewers: jason, tfoucher

Tags: #jenkins-ready

Differential Revision: https://phorge.dev.yugabyte.com/D37201
@sushantrmishra
Copy link

Reopening the issue to complete the backports to 2024.1

@OlegLoginov OlegLoginov self-assigned this Aug 22, 2024
OlegLoginov pushed a commit that referenced this issue Aug 28, 2024
Summary:
Original commits:
- 3d4bc2a / D35937
- e319945 / D37210

**BACKPORT NOTE:** to fix the failed test
`./yb_build.sh --java-test org.yb.pgsql.TestPgRegressContribPostgresFdw#schedule`
in the PG regress output file the keyword `Remote` was changed into `Storage`. E.g.:
```
-                           Remote SQL: SELECT c1, c2 FROM "S 1"."T 4"
+                           Storage SQL: SELECT c1, c2 FROM "S 1"."T 4"
```

With this diff, the following ALTER VIEW commands are allowed:

  - ALTER VIEW [ IF EXISTS ] name ALTER [ COLUMN ] column_name SET DEFAULT expression
  - ALTER VIEW [ IF EXISTS ] name ALTER [ COLUMN ] column_name DROP DEFAULT
  - ALTER VIEW [ IF EXISTS ] name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
  - ALTER VIEW [ IF EXISTS ] name RENAME TO new_name
  - ALTER VIEW [ IF EXISTS ] name SET SCHEMA new_schema

These commands do not require any additional YB changes, as they are metadata-only changes. Therefore, we only need to enable them in the parser.

Note: ALTER VIEW ... SET/RESET commands are not enabled as the generalized ALTER TABLE ... SET/RESET is not supported.
Jira: DB-12050

Test Plan: yb_view, yb_pg_create_view

Reviewers: myang, jason, fizaa

Reviewed By: myang

Subscribers: yql, jason

Differential Revision: https://phorge.dev.yugabyte.com/D37479
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2024.1 Backport Required area/ysql Yugabyte SQL (YSQL) kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue
Projects
None yet
Development

No branches or pull requests

4 participants