How to copy certain tables from one schema to another within same DB in Postgres keeping the original schema?
You can use create table ... like
create table schema2.the_table (like schema1.the_table including all);
Then insert the data from the source to the destination:
insert into schema2.the_table
select *
from schema1.the_table;
You can use CREATE TABLE AS SELECT. This ways you do not need to insert. Table will be created with data.
CREATE TABLE schema2.the_table
AS
SELECT * FROM schema1.the_table;
Simple syntax that works as of v12:
CREATE TABLE newSchema.newTable
AS TABLE oldSchema.oldTable;