Hello,
We are start using EBR last year and sometimes we find some surprising behavior.
Today I found that comments of editionable view are lost after view compile in a new edition. :-(
Testcase:
alter session set edition=ORA$BASE;
create user ebr_t1 default tablespace USERS;
alter user ebr_t1 quota 1m on users;
alter user ebr_t1 ENABLE EDITIONS;
create table ebr_t1.data_table (id number, text_value varchar2(50));
comment on table ebr_t1.data_table is 'data table';
comment on column ebr_t1.data_table.id is 'DT: Primary Key';
comment on column ebr_t1.data_table.text_value is 'DT: text value';
create or replace view ebr_t1.data_view as
select id, text_value from ebr_t1.data_table;
comment on table ebr_t1.data_view is 'data view';
comment on column ebr_t1.data_view.id is 'DV: Primary Key';
comment on column ebr_t1.data_view.text_value is 'DV: text value';
select * from dba_tab_comments tc where tc.owner='EBR_T1' and tc.table_name='DATA_TABLE';
select * from dba_col_comments cc where cc.owner='EBR_T1' and cc.table_name='DATA_TABLE';
create edition EBR_E1;
alter session set edition=EBR_E1;
select * from dba_tab_comments tc where tc.owner='EBR_T1' and tc.table_name='DATA_VIEW';
select * from dba_col_comments cc where cc.owner='EBR_T1' and cc.table_name='DATA_VIEW';
alter view ebr_t1.data_view compile;
select * from dba_tab_comments tc where tc.owner='EBR_T1' and tc.table_name='DATA_VIEW';
select * from dba_col_comments cc where cc.owner='EBR_T1' and cc.table_name='DATA_VIEW';
alter session set edition=ORA$BASE;
drop edition EBR_E1 cascade;
drop user ebr_t1 cascade;
Is it expected behavior or bug?I didn't find any catalog view, which is possible to use to recover comments for these types of objects, someting like
DBA_TAB_COMMENTS_AE.
I prepared just a small workaround:
store comments before compile inherited objects and then stored comments for the objects again create.Best regards Karel Prech
Can you please add the output of your test case to the question, because I'm not seeing any issues when I run it on my local machine.