|
7 | 7 | * Portions Copyright (c) 1994, Regents of the University of California |
8 | 8 | * |
9 | 9 | * IDENTIFICATION |
10 | | - * $PostgreSQL: pgsql/src/backend/commands/async.c,v 1.147 2009/06/11 14:48:55 momjian Exp $ |
| 10 | + * $PostgreSQL: pgsql/src/backend/commands/async.c,v 1.148 2009/07/21 20:24:51 petere Exp $ |
11 | 11 | * |
12 | 12 | *------------------------------------------------------------------------- |
13 | 13 | */ |
@@ -486,8 +486,8 @@ Exec_Listen(Relation lRel, const char *relname) |
486 | 486 |
|
487 | 487 | namestrcpy(&condname, relname); |
488 | 488 | values[Anum_pg_listener_relname - 1] = NameGetDatum(&condname); |
489 | | - values[Anum_pg_listener_pid - 1] = Int32GetDatum(MyProcPid); |
490 | | - values[Anum_pg_listener_notify - 1] = Int32GetDatum(0); /* no notifies pending */ |
| 489 | + values[Anum_pg_listener_listenerpid - 1] = Int32GetDatum(MyProcPid); |
| 490 | + values[Anum_pg_listener_notification - 1] = Int32GetDatum(0); /* no notifies pending */ |
491 | 491 |
|
492 | 492 | tuple = heap_form_tuple(RelationGetDescr(lRel), values, nulls); |
493 | 493 |
|
@@ -567,7 +567,7 @@ Exec_UnlistenAll(Relation lRel) |
567 | 567 |
|
568 | 568 | /* Find and delete all entries with my listenerPID */ |
569 | 569 | ScanKeyInit(&key[0], |
570 | | - Anum_pg_listener_pid, |
| 570 | + Anum_pg_listener_listenerpid, |
571 | 571 | BTEqualStrategyNumber, F_INT4EQ, |
572 | 572 | Int32GetDatum(MyProcPid)); |
573 | 573 | scan = heap_beginscan(lRel, SnapshotNow, 1, key); |
@@ -598,9 +598,9 @@ Send_Notify(Relation lRel) |
598 | 598 | /* preset data to update notify column to MyProcPid */ |
599 | 599 | memset(nulls, false, sizeof(nulls)); |
600 | 600 | memset(repl, false, sizeof(repl)); |
601 | | - repl[Anum_pg_listener_notify - 1] = true; |
| 601 | + repl[Anum_pg_listener_notification - 1] = true; |
602 | 602 | memset(value, 0, sizeof(value)); |
603 | | - value[Anum_pg_listener_notify - 1] = Int32GetDatum(MyProcPid); |
| 603 | + value[Anum_pg_listener_notification - 1] = Int32GetDatum(MyProcPid); |
604 | 604 |
|
605 | 605 | scan = heap_beginscan(lRel, SnapshotNow, 0, NULL); |
606 | 606 |
|
@@ -978,17 +978,17 @@ ProcessIncomingNotify(void) |
978 | 978 |
|
979 | 979 | /* Scan only entries with my listenerPID */ |
980 | 980 | ScanKeyInit(&key[0], |
981 | | - Anum_pg_listener_pid, |
| 981 | + Anum_pg_listener_listenerpid, |
982 | 982 | BTEqualStrategyNumber, F_INT4EQ, |
983 | 983 | Int32GetDatum(MyProcPid)); |
984 | 984 | scan = heap_beginscan(lRel, SnapshotNow, 1, key); |
985 | 985 |
|
986 | 986 | /* Prepare data for rewriting 0 into notification field */ |
987 | 987 | memset(nulls, false, sizeof(nulls)); |
988 | 988 | memset(repl, false, sizeof(repl)); |
989 | | - repl[Anum_pg_listener_notify - 1] = true; |
| 989 | + repl[Anum_pg_listener_notification - 1] = true; |
990 | 990 | memset(value, 0, sizeof(value)); |
991 | | - value[Anum_pg_listener_notify - 1] = Int32GetDatum(0); |
| 991 | + value[Anum_pg_listener_notification - 1] = Int32GetDatum(0); |
992 | 992 |
|
993 | 993 | while ((lTuple = heap_getnext(scan, ForwardScanDirection)) != NULL) |
994 | 994 | { |
|
0 commit comments