namestrcpy(&condname, relname);
values[Anum_pg_listener_relname - 1] = NameGetDatum(&condname);
- values[Anum_pg_listener_pid - 1] = Int32GetDatum(MyProcPid);
- values[Anum_pg_listener_notify - 1] = Int32GetDatum(0); /* no notifies pending */
+ values[Anum_pg_listener_listenerpid - 1] = Int32GetDatum(MyProcPid);
+ values[Anum_pg_listener_notification - 1] = Int32GetDatum(0); /* no notifies pending */
tuple = heap_form_tuple(RelationGetDescr(lRel), values, nulls);
/* Find and delete all entries with my listenerPID */
ScanKeyInit(&key[0],
- Anum_pg_listener_pid,
+ Anum_pg_listener_listenerpid,
BTEqualStrategyNumber, F_INT4EQ,
Int32GetDatum(MyProcPid));
scan = heap_beginscan(lRel, SnapshotNow, 1, key);
/* preset data to update notify column to MyProcPid */
memset(nulls, false, sizeof(nulls));
memset(repl, false, sizeof(repl));
- repl[Anum_pg_listener_notify - 1] = true;
+ repl[Anum_pg_listener_notification - 1] = true;
memset(value, 0, sizeof(value));
- value[Anum_pg_listener_notify - 1] = Int32GetDatum(MyProcPid);
+ value[Anum_pg_listener_notification - 1] = Int32GetDatum(MyProcPid);
scan = heap_beginscan(lRel, SnapshotNow, 0, NULL);
/* Scan only entries with my listenerPID */
ScanKeyInit(&key[0],
- Anum_pg_listener_pid,
+ Anum_pg_listener_listenerpid,
BTEqualStrategyNumber, F_INT4EQ,
Int32GetDatum(MyProcPid));
scan = heap_beginscan(lRel, SnapshotNow, 1, key);
/* Prepare data for rewriting 0 into notification field */
memset(nulls, false, sizeof(nulls));
memset(repl, false, sizeof(repl));
- repl[Anum_pg_listener_notify - 1] = true;
+ repl[Anum_pg_listener_notification - 1] = true;
memset(value, 0, sizeof(value));
- value[Anum_pg_listener_notify - 1] = Int32GetDatum(0);
+ value[Anum_pg_listener_notification - 1] = Int32GetDatum(0);
while ((lTuple = heap_getnext(scan, ForwardScanDirection)) != NULL)
{