create or replace function pd.check(
interval_ text[])
returns void as
$BODY$
BEGIN
EXECUTE '
drop table if exists check_;
create temp table check_
as
(
select unnest(' || interval_ || ')
) ;
';
END;
$BODY$
LANGUAGE PLPGSQL volatile;
I am running it as
select pd.check(ARRAY['2','3','4']);
It gives me an error :
operator is not unique: unknown || text[]
HINT: Could not choose a best candidate operator. You may need to add explicit type casts.