create a temp table to do the insert update in postgres code example
Example 1: temp table in postgresql
CREATE TEMP TABLE temp_table(
...
);
Example 2: temp table in postgresql
CREATE TEMPORARY TABLE temp_table_name(
column_list
);
CREATE TEMP TABLE temp_table(
...
);
CREATE TEMPORARY TABLE temp_table_name(
column_list
);