Skip to content

Commit bdeeb4f

Browse files
committed
Finally fix LISTEN problem.
1 parent f301fab commit bdeeb4f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/backend/commands/async.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.59 2000/04/12 17:14:57 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.60 2000/05/14 03:18:35 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -249,6 +249,15 @@ Async_Listen(char *relname, int pid)
249249
tupDesc = lRel->rd_att;
250250
newtup = heap_formtuple(tupDesc, values, nulls);
251251
heap_insert(lRel, newtup);
252+
if (RelationGetForm(lRel)->relhasindex)
253+
{
254+
Relation idescs[Num_pg_listener_indices];
255+
256+
CatalogOpenIndices(Num_pg_listener_indices, Name_pg_listener_indices, idescs);
257+
CatalogIndexInsert(idescs, Num_pg_listener_indices, lRel, newtup);
258+
CatalogCloseIndices(Num_pg_listener_indices, idescs);
259+
}
260+
252261
heap_freetuple(newtup);
253262

254263
heap_close(lRel, AccessExclusiveLock);

0 commit comments

Comments
 (0)