PostgreSQL Source Code
git master
|
#include "postgres_fe.h"
#include <unistd.h>
#include <fcntl.h>
#include <limits.h>
#include <sys/stat.h>
#include "libpq-fe.h"
#include "libpq-int.h"
#include "libpq/libpq-fs.h"
#include "port/pg_bswap.h"
Go to the source code of this file.
Macros | |
#define | LO_BUFSIZE 8192 |
int lo_close | ( | PGconn * | conn, |
int | fd | ||
) |
Definition at line 96 of file fe-lobj.c.
References conn, fd(), pgLobjfuncs::fn_lo_close, PQArgBlock::integer, PQArgBlock::isint, PQArgBlock::len, lo_initialize(), pg_conn::lobjfuncs, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), res, and PQArgBlock::u.
Referenced by dumpLOs(), EndRestoreLO(), exportFile(), importFile(), lo_export(), lo_import_internal(), my_truncate(), overwrite(), and pickout().
Definition at line 438 of file fe-lobj.c.
References conn, pgLobjfuncs::fn_lo_creat, PQArgBlock::integer, InvalidOid, PQArgBlock::isint, PQArgBlock::len, lo_initialize(), pg_conn::lobjfuncs, mode, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), res, and PQArgBlock::u.
Referenced by importFile(), and lo_import_internal().
Definition at line 474 of file fe-lobj.c.
References conn, pgLobjfuncs::fn_lo_create, PQArgBlock::integer, InvalidOid, PQArgBlock::isint, PQArgBlock::len, libpq_append_conn_error(), lo_initialize(), pg_conn::lobjfuncs, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), res, and PQArgBlock::u.
Referenced by lo_import_internal(), and StartRestoreLO().
Definition at line 748 of file fe-lobj.c.
References buf, close, conn, fd(), filename, INV_READ, libpq_append_conn_error(), LO_BUFSIZE, lo_close(), lo_open(), lo_read(), PG_BINARY, PG_STRERROR_R_BUFLEN, pqClearConnErrorState, strerror_r, and write.
Referenced by do_lo_export(), and main().
Definition at line 1023 of file fe-lobj.c.
References pg_hton32.
Referenced by lo_lseek64(), and lo_truncate64().
Definition at line 626 of file fe-lobj.c.
References conn, filename, InvalidOid, and lo_import_internal().
Referenced by do_lo_import(), and main().
Definition at line 647 of file fe-lobj.c.
References buf, close, conn, fd(), filename, INV_READ, INV_WRITE, InvalidOid, libpq_append_conn_error(), LO_BUFSIZE, lo_close(), lo_creat(), lo_create(), lo_open(), lo_write(), PG_BINARY, PG_STRERROR_R_BUFLEN, pqClearConnErrorState, read, and strerror_r.
Referenced by lo_import(), and lo_import_with_oid().
Definition at line 641 of file fe-lobj.c.
References conn, filename, and lo_import_internal().
|
static |
Definition at line 843 of file fe-lobj.c.
References conn, pgLobjfuncs::fn_lo_close, pgLobjfuncs::fn_lo_creat, pgLobjfuncs::fn_lo_create, pgLobjfuncs::fn_lo_lseek, pgLobjfuncs::fn_lo_lseek64, pgLobjfuncs::fn_lo_open, pgLobjfuncs::fn_lo_read, pgLobjfuncs::fn_lo_tell, pgLobjfuncs::fn_lo_tell64, pgLobjfuncs::fn_lo_truncate, pgLobjfuncs::fn_lo_truncate64, pgLobjfuncs::fn_lo_unlink, pgLobjfuncs::fn_lo_write, free, if(), libpq_append_conn_error(), pg_conn::lobjfuncs, malloc, MemSet, PGRES_TUPLES_OK, PQclear(), pqClearConnErrorState, PQexec(), PQgetvalue(), PQntuples(), res, and pg_result::resultStatus.
Referenced by lo_close(), lo_creat(), lo_create(), lo_lseek(), lo_lseek64(), lo_open(), lo_read(), lo_tell(), lo_tell64(), lo_truncate(), lo_truncate64(), lo_unlink(), and lo_write().
int lo_lseek | ( | PGconn * | conn, |
int | fd, | ||
int | offset, | ||
int | whence | ||
) |
Definition at line 344 of file fe-lobj.c.
References conn, fd(), pgLobjfuncs::fn_lo_lseek, PQArgBlock::integer, PQArgBlock::isint, PQArgBlock::len, lo_initialize(), pg_conn::lobjfuncs, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), res, and PQArgBlock::u.
Referenced by overwrite(), and pickout().
Definition at line 385 of file fe-lobj.c.
References conn, fd(), pgLobjfuncs::fn_lo_lseek64, PQArgBlock::integer, PQArgBlock::isint, PQArgBlock::len, libpq_append_conn_error(), lo_hton64(), lo_initialize(), lo_ntoh64(), pg_conn::lobjfuncs, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), PQArgBlock::ptr, res, and PQArgBlock::u.
Referenced by overwrite(), and pickout().
Definition at line 1048 of file fe-lobj.c.
References pg_ntoh32.
Referenced by lo_lseek64(), and lo_tell64().
Definition at line 57 of file fe-lobj.c.
References conn, fd(), pgLobjfuncs::fn_lo_open, PQArgBlock::integer, PQArgBlock::isint, PQArgBlock::len, lo_initialize(), pg_conn::lobjfuncs, mode, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), res, and PQArgBlock::u.
Referenced by dumpLOs(), exportFile(), importFile(), lo_export(), lo_import_internal(), my_truncate(), overwrite(), pickout(), and StartRestoreLO().
int lo_read | ( | PGconn * | conn, |
int | fd, | ||
char * | buf, | ||
size_t | len | ||
) |
Definition at line 245 of file fe-lobj.c.
References buf, conn, fd(), pgLobjfuncs::fn_lo_read, PQArgBlock::integer, PQArgBlock::isint, PQArgBlock::len, len, libpq_append_conn_error(), lo_initialize(), pg_conn::lobjfuncs, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), res, and PQArgBlock::u.
Referenced by lo_export().
int lo_tell | ( | PGconn * | conn, |
int | fd | ||
) |
Definition at line 515 of file fe-lobj.c.
References conn, fd(), pgLobjfuncs::fn_lo_tell, PQArgBlock::integer, PQArgBlock::isint, PQArgBlock::len, lo_initialize(), pg_conn::lobjfuncs, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), res, and PQArgBlock::u.
Definition at line 548 of file fe-lobj.c.
References conn, fd(), pgLobjfuncs::fn_lo_tell64, PQArgBlock::integer, PQArgBlock::isint, PQArgBlock::len, libpq_append_conn_error(), lo_initialize(), lo_ntoh64(), pg_conn::lobjfuncs, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), res, and PQArgBlock::u.
Referenced by pickout().
int lo_truncate | ( | PGconn * | conn, |
int | fd, | ||
size_t | len | ||
) |
Definition at line 131 of file fe-lobj.c.
References conn, fd(), pgLobjfuncs::fn_lo_truncate, PQArgBlock::integer, PQArgBlock::isint, PQArgBlock::len, len, libpq_append_conn_error(), lo_initialize(), pg_conn::lobjfuncs, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), res, and PQArgBlock::u.
Definition at line 195 of file fe-lobj.c.
References conn, fd(), pgLobjfuncs::fn_lo_truncate64, PQArgBlock::integer, PQArgBlock::isint, PQArgBlock::len, len, libpq_append_conn_error(), lo_hton64(), lo_initialize(), pg_conn::lobjfuncs, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), PQArgBlock::ptr, res, and PQArgBlock::u.
Referenced by my_truncate().
Definition at line 589 of file fe-lobj.c.
References conn, pgLobjfuncs::fn_lo_unlink, PQArgBlock::integer, PQArgBlock::isint, PQArgBlock::len, lo_initialize(), pg_conn::lobjfuncs, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), res, and PQArgBlock::u.
Referenced by do_lo_unlink(), and vacuumlo().
int lo_write | ( | PGconn * | conn, |
int | fd, | ||
const char * | buf, | ||
size_t | len | ||
) |
Definition at line 295 of file fe-lobj.c.
References buf, conn, fd(), pgLobjfuncs::fn_lo_write, PQArgBlock::integer, PQArgBlock::isint, PQArgBlock::len, len, libpq_append_conn_error(), lo_initialize(), pg_conn::lobjfuncs, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), PQArgBlock::ptr, res, PQArgBlock::u, and unconstify.
Referenced by lo_import_internal().