[Feature] Support Invisible Columns#401
[Feature] Support Invisible Columns#401YinZheng-Sun wants to merge 4 commits intoApsaraDB:POLARDB_11_DEVfrom
Conversation
|
Hi @YinZheng-Sun ~ Congratulations to your first PR to PolarDB. 🎉 Please make sure that your PR conforms the standard, and has passed all the checks. We will review your PR as soon as possible. |
|
Hey @YinZheng-Sun : Something wrong occuried during the checks of your commit 😟, please check the detail:
|
847f80f to
1ccabe7
Compare
|
Hey @YinZheng-Sun : Something wrong occuried during the checks of your commit 😟, please check the detail:
|
|
Hey @YinZheng-Sun : Congratulations~ 🎉 Your commit has passed all the checks. Please wait for further manual review. |
|
|
||
| coldef->inhcount = 0; | ||
| coldef->is_invisible = false; | ||
| coldef->is_local = true; |
| (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), | ||
| errmsg("cannot alter system column \"%s\"", | ||
| colName))); | ||
|
|
| * lookup the attribute | ||
| */ | ||
| attr_rel = heap_open(AttributeRelationId, RowExclusiveLock); | ||
|
|
| (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), | ||
| errmsg("cannot alter system column \"%s\"", | ||
| colName))); | ||
|
|
| ((Form_pg_attribute) GETSTRUCT(tuple))->attisinvisible = true; | ||
|
|
||
| CatalogTupleUpdate(attr_rel, &tuple->t_self, tuple); | ||
|
|
| @@ -220,6 +220,7 @@ PG_KEYWORD("integer", INTEGER, COL_NAME_KEYWORD) | |||
| PG_KEYWORD("intersect", INTERSECT, RESERVED_KEYWORD) | |||
| PG_KEYWORD("interval", INTERVAL, COL_NAME_KEYWORD) | |||
| PG_KEYWORD("into", INTO, RESERVED_KEYWORD) | |||
| b INT | ||
| ); | ||
|
|
||
|
|
| INSERT INTO TEST_INVISIBLE_TBL2 VALUES (1); | ||
| INSERT INTO TEST_INVISIBLE_TBL2 VALUES (1, 1); | ||
| INSERT INTO TEST_INVISIBLE_TBL2 (a, b) VALUES (1, 1); | ||
|
|
There was a problem hiding this comment.
select I_SEL_t.* FROM I_SEL_t;
select (I_SEL_t).* FROM I_SEL_t;
这种场景如何处理?
|
|
||
| INSERT INTO TEST_INVISIBLE_TBL3 VALUES (1); | ||
| INSERT INTO TEST_INVISIBLE_TBL3 (a, b) VALUES (1, 1); | ||
|
|
There was a problem hiding this comment.
CREATE TABLE I_SEL_type(i int, j int INVISIBLE, k int);
SELECT (1)::I_SEL_t;
SELECT (1,2)::I_SEL_t;
SELECT (1,2)::I_SEL_type;
SELECT ((1,2)::I_SEL_type).*;
SELECT ((1,2)::I_SEL_type).i;
SELECT ((1,2)::I_SEL_type).j;
对于类型转换的测试场景可以在测试一下
| | ALTER opt_column ColId SET INVISIBLE | ||
| { | ||
| AlterTableCmd *n = makeNode(AlterTableCmd); | ||
| n->subtype = AT_SetInvisible; |
There was a problem hiding this comment.
添加ALTER TABLE I_SEL_t MODIFY i VISIBLE;
Modify语法
c668e4f to
c86bcd0
Compare
|
Hey @YinZheng-Sun : Something wrong occuried during the checks of your commit 😟, please check the detail:
|
… be more than one
c86bcd0 to
af1722c
Compare
|
Hey @YinZheng-Sun : Congratulations~ 🎉 Your commit has passed all the checks. Please wait for further manual review. |
|
Hey @YinZheng-Sun : Congratulations~ 🎉 Your commit has passed all the checks. Please wait for further manual review. |
Problem Summary:
Fix #389
After Oracle 12c, users have the ability to customize hidden columns in an invisible form. Hidden columns play a crucial role in facilitating the migration and development of user applications, significantly enhancing the flexibility of table usage.
The objective of this project is to provide support for users to specify the hidden attribute of a column during the CREATE TABLE or ALTER TABLE statements, while being compatible with Oracle's syntax for hidden columns.
What type of PR is this:
Checklist: