Index: src/interfaces/libpq/fe-exec.c =================================================================== RCS file: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v retrieving revision 1.118 diff -c -r1.118 fe-exec.c *** src/interfaces/libpq/fe-exec.c 8 Apr 2002 03:48:10 -0000 1.118 --- src/interfaces/libpq/fe-exec.c 15 Apr 2002 00:15:29 -0000 *************** *** 1510,1517 **** return EOF; if (pqGets(&conn->workBuffer, conn)) return EOF; ! newNotify = (PGnotify *) malloc(sizeof(PGnotify)); ! strncpy(newNotify->relname, conn->workBuffer.data, NAMEDATALEN); newNotify->be_pid = be_pid; DLAddTail(conn->notifyList, DLNewElem(newNotify)); return 0; --- 1510,1525 ---- return EOF; if (pqGets(&conn->workBuffer, conn)) return EOF; ! ! /* ! * Store the relation name right after the PQnotify structure so it can ! * all be freed at once. We don't use NAMEDATALEN because we don't ! * want to tie this interface to a specific server name length. ! */ ! newNotify = (PGnotify *) malloc(sizeof(PGnotify) + ! strlen(conn->workBuffer.data) + 1); ! newNotify->relname = (char *)newNotify + sizeof(PGnotify); ! strcpy(newNotify->relname, conn->workBuffer.data); newNotify->be_pid = be_pid; DLAddTail(conn->notifyList, DLNewElem(newNotify)); return 0; Index: src/interfaces/libpq/libpq-fe.h =================================================================== RCS file: /cvsroot/pgsql/src/interfaces/libpq/libpq-fe.h,v retrieving revision 1.83 diff -c -r1.83 libpq-fe.h *** src/interfaces/libpq/libpq-fe.h 5 Mar 2002 06:07:26 -0000 1.83 --- src/interfaces/libpq/libpq-fe.h 15 Apr 2002 00:15:40 -0000 *************** *** 105,112 **** */ typedef struct pgNotify { ! char relname[NAMEDATALEN]; /* name of relation containing ! * data */ int be_pid; /* process id of backend */ } PGnotify; --- 105,111 ---- */ typedef struct pgNotify { ! char *relname; /* name of relation containing data */ int be_pid; /* process id of backend */ } PGnotify;