dolthub / doltgresql

DoltgreSQL - Version Controlled PostgreSQL
Apache License 2.0
1.12k stars 25 forks source link

Support for `ALTER TABLE OWNER` #953

Open fulghum opened 2 weeks ago

fulghum commented 2 weeks ago

ALTER TABLE OWNER is commonly used in data imports, and this change allows the table ownership data to be updated by a superuser.

Longer term, instead of handling these statements directly at the Doltgres layer, it would be cleaner to introduce a new interface in GMS for ownership modifications so that Doltgres could provide an implementation, then GMS could cleanly call back into Doltgres to make the ownership update. As we add ownership metadata support for additional entities, that seems like the right time to refactor out an interface.

Related to: https://github.com/dolthub/doltgresql/issues/724

github-actions[bot] commented 2 weeks ago
Main PR
Total 42090 42090
Successful 14415 14425
Failures 27675 27665
Partial Successes[^1] 4692 4692
Main PR
Successful 34.2480% 34.2718%
Failures 65.7520% 65.7282%

${\color{lightgreen}Progressions}$

cluster

QUERY: ALTER TABLE clstr_1 OWNER TO regress_clstr_user;
QUERY: ALTER TABLE clstr_3 OWNER TO regress_clstr_user;
QUERY: ALTER TABLE ptnowner OWNER TO regress_ptnowner;

dependency

QUERY: ALTER TABLE deptest OWNER TO regress_dep_user3;

rowsecurity

QUERY: ALTER TABLE t1 OWNER TO regress_rls_alice;

security_label

QUERY: ALTER TABLE seclabel_tbl1 OWNER TO regress_seclabel_user1;
QUERY: ALTER TABLE seclabel_tbl2 OWNER TO regress_seclabel_user2;

tablespace

QUERY: ALTER TABLE testschema.tablespace_acl OWNER TO regress_tablespace_user2;

vacuum

QUERY: ALTER TABLE vacowned_parted OWNER TO regress_vacuum;
QUERY: ALTER TABLE vacowned_parted OWNER TO regress_vacuum;

[^1]: These are tests that we're marking as Successful, however they do not match the expected output in some way. This is due to small differences, such as different wording on the error messages, or the column names being incorrect while the data itself is correct.