I'd like to INSERT data from one table to another, where the destination table has all the source columns with a few others in between. The tables have a large number of columns (plus this can get repeated now and then), so I'd rather not explicitly write the column names.
Along the lines of (doesn't work):
INSERT INTO dest_table
(SELECT string_agg(column_name, ', ')
FROM information_schema.columns
WHERE table_schema = 'public'
AND table_name = 'source_table')
SELECT * from source_table
The context is that I'm trying to alter a column's position.