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

Commit194ed4e

Browse files
committed
More patches/documentation from: Massimo Dal Zotto <dz@cs.unitn.it>
1 parent07c8d9f commit194ed4e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

‎src/backend/commands/async.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.9 1996/12/1904:54:56 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.10 1996/12/1905:01:17 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -178,7 +178,11 @@ Async_Notify(char *relname)
178178
if (!pendingNotifies)
179179
pendingNotifies=DLNewList();
180180

181-
notifyName=pstrdup(relname);
181+
/*
182+
* Allocate memory from the global malloc pool because it needs to be
183+
* referenced also when the transaction is finished. DZ - 26-08-1996
184+
*/
185+
notifyName=strdup(relname);
182186
DLAddHead(pendingNotifies,DLNewElem(notifyName));
183187

184188
ScanKeyEntryInitialize(&key,0,
@@ -580,7 +584,8 @@ AsyncExistsPendingNotify(char *relname)
580584
for (p=DLGetHead(pendingNotifies);
581585
p!=NULL;
582586
p=DLGetSucc(p)) {
583-
if (!strcmp(DLE_VAL(p),relname))
587+
/* Use NAMEDATALEN for relname comparison. DZ - 26-08-1996 */
588+
if (!strncmp(DLE_VAL(p),relname,NAMEDATALEN))
584589
return1;
585590
}
586591

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp