Hi,
I have 3 tables
foo
foo_loading_source1
foo_loading_source2
which is something like
create table foo (a int, b int, c int)
create table foo_loading_source1 (a int, b int, c int)
create table foo_loading_source2 (a int, b int, c int)
Is there a way which can be made easier to keep these 3 tables DDL in
sync?
the loading_sourceX tables are just a temporary-in-transit table for
data \copy'ied into the DB before being inserted into the main foo
table.
Currently, each time I add a new column to foo, I have to "remember" to
add the same to the other 2 table.
Can I use inheritance? References?
or will I have to create a procedural function such that it will add the
same ddl to all 3 tables each time a new column is defined?