View does not contain all columns

10 views
Skip to first unread message

Robert Gilland

unread,
Nov 20, 2021, 5:16:16 PM11/20/21
to firebird-support
I create a view:

create view view_myTable 
as
select  * from my_table

I add a column to my_table

alter table my_table add my_col integer;

Then vw_myTable does not contain my_col.

I think this is a bug.

Dimitry Sibiryakov

unread,
Nov 20, 2021, 5:35:29 PM11/20/21
to firebird...@googlegroups.com
Robert Gilland wrote 20.11.2021 23:16:
> alter table my_table add my_col integer;
>
> Then vw_myTable does not contain my_col.
>
> I think this is a bug.

No, it is by design. View's columns are defined statically at the moment of
it's compilation (on commit after creation or modification).

--
WBR, SD.

Robert Gilland

unread,
Nov 20, 2021, 6:30:10 PM11/20/21
to firebird-support
Okay then I am going to have to change my table update code to include refreshing of all dependent views. This is a "gotcha" to me.
Reply all
Reply to author
Forward
0 new messages