Content-Length: 277032 | pFad | http://github.com/postgrespro/postgres/commit/75af5ae9c017d70531bd49178adfd3103cd40a76

57 Don't trash input list structure in does_not_exist_skipping(). · postgrespro/postgres@75af5ae · GitHub
Skip to content

Commit 75af5ae

Browse files
committed
Don't trash input list structure in does_not_exist_skipping().
The trigger and rule cases need to split up the input name list, but they mustn't corrupt the passed-in data structure, since it could be part of a cached utility-statement parsetree. Per bug #7641.
1 parent a9dad56 commit 75af5ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/commands/dropcmds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ does_not_exist_skipping(ObjectType objtype, List *objname, List *objargs)
203203
case OBJECT_TRIGGER:
204204
msg = gettext_noop("trigger \"%s\" for table \"%s\" does not exist, skipping");
205205
name = strVal(llast(objname));
206-
args = NameListToString(list_truncate(objname,
206+
args = NameListToString(list_truncate(list_copy(objname),
207207
list_length(objname) - 1));
208208
break;
209209
case OBJECT_EVENT_TRIGGER:
@@ -213,7 +213,7 @@ does_not_exist_skipping(ObjectType objtype, List *objname, List *objargs)
213213
case OBJECT_RULE:
214214
msg = gettext_noop("rule \"%s\" for relation \"%s\" does not exist, skipping");
215215
name = strVal(llast(objname));
216-
args = NameListToString(list_truncate(objname,
216+
args = NameListToString(list_truncate(list_copy(objname),
217217
list_length(objname) - 1));
218218
break;
219219
case OBJECT_FDW:

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/75af5ae9c017d70531bd49178adfd3103cd40a76

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy