Append a list of tables to an empty table to form a whole table - Mailing list pgsql-sql

From Shaozhong SHI
Subject Append a list of tables to an empty table to form a whole table
Date
Msg-id CA+i5JwaD2rz-jJdm9_SK=88z=J0SDNmij98hMZxCwLuHxbz2Mw@mail.gmail.com
Whole thread Raw
Responses Re: Append a list of tables to an empty table to form a whole table  (Frank Gard <frank.von.postgresql.org@familie-gard.de>)
List pgsql-sql


How best to append a list of tables to an empty table to form a whole table?

Pseudo codes show the desirable logic.



There are a list of tables with exactly same colums
table_a
table_b
table_c

Create an empty table  emp_table

Foreach a_name in ARRAY ARRAY['table_a', 'table_b', 'table_c'] loop
   insert into em_table as select * from table a_name

end loop;

Can something like that be done is PostGIS?

Regards,

David

pgsql-sql by date:

Previous
From: Frank Gard
Date:
Subject: Re: How to union all tables in a schema into one whole table?
Next
From: Frank Gard
Date:
Subject: Re: Append a list of tables to an empty table to form a whole table