Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit24541ff

Browse files
committed
... and the very same bug in publicationListToArray().
Sigh.
1 parent7376390 commit24541ff

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎src/backend/commands/subscriptioncmds.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ parse_subscription_options(List *options, bool *connect, bool *enabled_given,
244244
}
245245

246246
/*
247-
* Auxiliary function toreturn a text array out of a list of String nodes.
247+
* Auxiliary function tobuild a text array out of a list of String nodes.
248248
*/
249249
staticDatum
250250
publicationListToArray(List*publist)
@@ -264,7 +264,8 @@ publicationListToArray(List *publist)
264264
ALLOCSET_DEFAULT_MAXSIZE);
265265
oldcxt=MemoryContextSwitchTo(memcxt);
266266

267-
datums=palloc(sizeof(text*)*list_length(publist));
267+
datums= (Datum*)palloc(sizeof(Datum)*list_length(publist));
268+
268269
foreach(cell,publist)
269270
{
270271
char*name=strVal(lfirst(cell));
@@ -275,7 +276,7 @@ publicationListToArray(List *publist)
275276
{
276277
char*pname=strVal(lfirst(pcell));
277278

278-
if (name==pname)
279+
if (pcell==cell)
279280
break;
280281

281282
if (strcmp(name,pname)==0)
@@ -292,6 +293,7 @@ publicationListToArray(List *publist)
292293

293294
arr=construct_array(datums,list_length(publist),
294295
TEXTOID,-1, false,'i');
296+
295297
MemoryContextDelete(memcxt);
296298

297299
returnPointerGetDatum(arr);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp