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

Function GetCursorNumber

contrib/postgres_fdw/connection.c:655–659  ·  view source on GitHub ↗

* Assign a "unique" number for a cursor. * * These really only need to be unique per connection within a transaction. * For the moment we ignore the per-connection point and assign them across * all connections in the transaction, but we ask for the connection to be * supplied in case we want to refine that. * * Note that even if wraparound happens in a very long transaction, actual * coll

Source from the content-addressed store, hash-verified

653 * collisions are highly improbable; just be sure to use %u not %d to print.
654 */
655unsigned int
656GetCursorNumber(PGconn *conn)
657{
658 return ++cursor_number;
659}
660
661/*
662 * Assign a "unique" number for a prepared statement.

Callers 2

postgresBeginForeignScanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected