MCPcopy Create free account
hub / github.com/apache/cloudberry / PQnotifies

Function PQnotifies

src/interfaces/libpq/fe-exec.c:2554–2574  ·  view source on GitHub ↗

* PQnotifies * returns a PGnotify* structure of the latest async notification * that has not yet been handled * * returns NULL, if there is currently * no unhandled async notification from the backend * * the CALLER is responsible for FREE'ing the structure returned * * Note that this function does not read any new data from the socket; * so usually, caller should call PQconsumeInput()

Source from the content-addressed store, hash-verified

2552 * so usually, caller should call PQconsumeInput() first.
2553 */
2554PGnotify *
2555PQnotifies(PGconn *conn)
2556{
2557 PGnotify *event;
2558
2559 if (!conn)
2560 return NULL;
2561
2562 /* Parse any available data to see if we can extract NOTIFY messages. */
2563 parseInput(conn);
2564
2565 event = conn->notifyHead;
2566 if (event)
2567 {
2568 conn->notifyHead = event->next;
2569 if (!conn->notifyHead)
2570 conn->notifyTail = NULL;
2571 event->next = NULL; /* don't let app see the internal state */
2572 }
2573 return event;
2574}
2575
2576/*
2577 * PQputCopyData - send some data to the backend during COPY IN or COPY BOTH

Callers 6

dblink_get_notifyFunction · 0.85
processResultsFunction · 0.85
try_complete_stepFunction · 0.85
mainFunction · 0.85
ecpg_process_outputFunction · 0.85
PrintNotificationsFunction · 0.85

Calls 1

parseInputFunction · 0.85

Tested by 2

try_complete_stepFunction · 0.68
mainFunction · 0.68