Isso porque
unnest e sua unnest_table ambos retornam SETOF , e os operadores podem receber no máximo um argumento definido , então f.ex.:SELECT unnest(ARRAY['a', 'b', 'c']);
-- will return
unnest
------
"a"
"b"
"c"
SELECT unnest(ARRAY['a', 'b', 'c']) || 'd';
-- will return
?column?
--------
"ad"
"bd"
"cd"
SELECT unnest(ARRAY['a', 'b', 'c']) || 'd' || unnest(ARRAY['a', 'b', 'c']);
-- will return
ERROR: functions and operators can take at most one set argument
SQL state: 0A000
Editar :mas eu duvido muito, você quer criar tanta tabela com o mesmo nome - também
EXECUTE não aceita mais de uma linha:ERROR: query "..." returned more than one row
SQL state: 21000
Acho que você deveria usar algo como o
array_to_string()
função.