Mark Gibson <gibsonm(at)cromwell(dot)co(dot)uk> writes:
> Try this:
> my_query := ''create table '' || quote_ident(NEW.tablename)
> || '' ( arg1 '' || quote_ident(NEW.arg1) || '');'';
quote_ident() seems appropriate for the table name, but you might want
to leave it off the type name. For instance, if the argument is
'varchar(20)' then quote_ident would mess things up.
regards, tom lane