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

Function lo_tell

src/interfaces/libpq/fe-lobj.c:521–548  ·  view source on GitHub ↗

* lo_tell * returns the current seek location of the large object */

Source from the content-addressed store, hash-verified

519 * returns the current seek location of the large object
520 */
521int
522lo_tell(PGconn *conn, int fd)
523{
524 int retval;
525 PQArgBlock argv[1];
526 PGresult *res;
527 int result_len;
528
529 if (lo_initialize(conn) < 0)
530 return -1;
531
532 argv[0].isint = 1;
533 argv[0].len = 4;
534 argv[0].u.integer = fd;
535
536 res = PQfn(conn, conn->lobjfuncs->fn_lo_tell,
537 &retval, &result_len, 1, argv, 1);
538 if (PQresultStatus(res) == PGRES_COMMAND_OK)
539 {
540 PQclear(res);
541 return retval;
542 }
543 else
544 {
545 PQclear(res);
546 return -1;
547 }
548}
549
550/*
551 * lo_tell64

Callers

nothing calls this directly

Calls 4

lo_initializeFunction · 0.85
PQfnFunction · 0.85
PQresultStatusFunction · 0.85
PQclearFunction · 0.85

Tested by

no test coverage detected