case OBJECT_TRIGGER:
msg = gettext_noop("trigger \"%s\" for table \"%s\" does not exist, skipping");
name = strVal(llast(objname));
- args = NameListToString(list_truncate(objname,
+ args = NameListToString(list_truncate(list_copy(objname),
list_length(objname) - 1));
break;
case OBJECT_EVENT_TRIGGER:
case OBJECT_RULE:
msg = gettext_noop("rule \"%s\" for relation \"%s\" does not exist, skipping");
name = strVal(llast(objname));
- args = NameListToString(list_truncate(objname,
+ args = NameListToString(list_truncate(list_copy(objname),
list_length(objname) - 1));
break;
case OBJECT_FDW: