#include "postgres.h"
#include <limits.h>
#include "access/detoast.h"
#include "access/genam.h"
#include "access/htup_details.h"
#include "access/table.h"
#include "access/xact.h"
#include "catalog/dependency.h"
#include "catalog/indexing.h"
#include "catalog/objectaccess.h"
#include "catalog/pg_largeobject.h"
#include "libpq/libpq-fs.h"
#include "miscadmin.h"
#include "storage/large_object.h"
#include "utils/acl.h"
#include "utils/fmgroids.h"
#include "utils/rel.h"
#include "utils/snapmgr.h"
Go to the source code of this file.
Definition at line 97 of file inv_api.c.
References CurrentResourceOwner, index_close(), lo_heap_r, lo_index_r, NoLock, table_close(), and TopTransactionResourceOwner.
Referenced by AtEOXact_LargeObject().
Definition at line 131 of file inv_api.c.
References detoast_attr(), ereport, errcode(), ERRCODE_DATA_CORRUPTED, errmsg(), ERROR, len, LOBLKSIZE, VARATT_IS_EXTENDED(), VARHDRSZ, and VARSIZE().
Referenced by inv_getsize(), inv_read(), inv_truncate(), and inv_write().
Definition at line 299 of file inv_api.c.
References Assert(), and pfree().
Referenced by be_lo_export(), be_lo_from_bytea(), be_lo_put(), closeLOfd(), lo_get_fragment_internal(), and lo_import_internal().
Definition at line 173 of file inv_api.c.
References CommandCounterIncrement(), GetUserId(), InvokeObjectPostCreateHook, LargeObjectCreate(), and recordDependencyOnOwner().
Referenced by be_lo_creat(), be_lo_create(), be_lo_from_bytea(), and lo_import_internal().
Definition at line 311 of file inv_api.c.
References ObjectAddress::classId, CommandCounterIncrement(), DROP_CASCADE, and performDeletion().
Referenced by be_lo_unlink().
Definition at line 340 of file inv_api.c.
References Assert(), BackwardScanDirection, BTEqualStrategyNumber, data, elog, ERROR, getdatafield(), GETSTRUCT(), HeapTupleHasNulls(), HeapTupleIsValid, LargeObjectDesc::id, if(), len, lo_heap_r, lo_index_r, LOBLKSIZE, ObjectIdGetDatum(), open_lo_relation(), pfree(), ScanKeyInit(), LargeObjectDesc::snapshot, systable_beginscan_ordered(), systable_endscan_ordered(), and systable_getnext_ordered().
Referenced by inv_seek().
Definition at line 215 of file inv_api.c.
References ACL_SELECT, ACL_UPDATE, ACLCHECK_OK, ereport, errcode(), errmsg(), ERROR, LargeObjectDesc::flags, GetActiveSnapshot(), GetUserId(), LargeObjectDesc::id, IFS_RDLOCK, IFS_WRLOCK, INV_READ, INV_WRITE, InvalidSubTransactionId, LargeObjectExistsWithSnapshot(), lo_compat_privileges, MemoryContextAlloc(), LargeObjectDesc::offset, pg_largeobject_aclcheck_snapshot(), LargeObjectDesc::snapshot, and LargeObjectDesc::subid.
Referenced by be_lo_export(), be_lo_from_bytea(), be_lo_open(), be_lo_put(), lo_get_fragment_internal(), and lo_import_internal().
Definition at line 450 of file inv_api.c.
References Assert(), BTEqualStrategyNumber, BTGreaterEqualStrategyNumber, buf, data, elog, ereport, errcode(), errmsg(), ERROR, LargeObjectDesc::flags, ForwardScanDirection, getdatafield(), GETSTRUCT(), HeapTupleHasNulls(), LargeObjectDesc::id, IFS_RDLOCK, Int32GetDatum(), len, lo_heap_r, lo_index_r, LOBLKSIZE, MemSet, ObjectIdGetDatum(), LargeObjectDesc::offset, open_lo_relation(), pfree(), ScanKeyInit(), LargeObjectDesc::snapshot, systable_beginscan_ordered(), systable_endscan_ordered(), systable_getnext_ordered(), and VARDATA().
Referenced by be_lo_export(), lo_get_fragment_internal(), and lo_read().
Definition at line 388 of file inv_api.c.
References Assert(), ereport, errcode(), errmsg(), errmsg_internal(), ERROR, INT64_FORMAT, inv_getsize(), MAX_LARGE_OBJECT_SIZE, and LargeObjectDesc::offset.
Referenced by be_lo_lseek(), be_lo_lseek64(), be_lo_put(), and lo_get_fragment_internal().
Definition at line 437 of file inv_api.c.
References Assert(), and LargeObjectDesc::offset.
Referenced by be_lo_tell(), and be_lo_tell64().
Definition at line 740 of file inv_api.c.
References Assert(), BTEqualStrategyNumber, BTGreaterEqualStrategyNumber, CatalogCloseIndexes(), CatalogOpenIndexes(), CatalogTupleDelete(), CatalogTupleInsertWithInfo(), CatalogTupleUpdateWithInfo(), CommandCounterIncrement(), data, elog, ereport, errcode(), errmsg(), errmsg_internal(), ERROR, LargeObjectDesc::flags, ForwardScanDirection, getdatafield(), GETSTRUCT(), heap_form_tuple(), heap_freetuple(), heap_modify_tuple(), HeapTupleHasNulls(), LargeObjectDesc::id, IFS_WRLOCK, Int32GetDatum(), INT64_FORMAT, len, lo_heap_r, lo_index_r, LOBLKSIZE, MAX_LARGE_OBJECT_SIZE, MemSet, ObjectIdGetDatum(), open_lo_relation(), pfree(), PointerGetDatum(), RelationData::rd_att, RelationGetDescr, ScanKeyInit(), SET_VARSIZE(), LargeObjectDesc::snapshot, systable_beginscan_ordered(), systable_endscan_ordered(), systable_getnext_ordered(), HeapTupleData::t_self, values, VARDATA(), and VARHDRSZ.
Referenced by lo_truncate_internal().
Definition at line 543 of file inv_api.c.
References Assert(), BTEqualStrategyNumber, BTGreaterEqualStrategyNumber, buf, CatalogCloseIndexes(), CatalogOpenIndexes(), CatalogTupleInsertWithInfo(), CatalogTupleUpdateWithInfo(), CommandCounterIncrement(), data, elog, ereport, errcode(), errmsg(), ERROR, LargeObjectDesc::flags, ForwardScanDirection, getdatafield(), GETSTRUCT(), heap_form_tuple(), heap_freetuple(), heap_modify_tuple(), HeapTupleHasNulls(), LargeObjectDesc::id, IFS_WRLOCK, Int32GetDatum(), len, lo_heap_r, lo_index_r, LOBLKSIZE, MAX_LARGE_OBJECT_SIZE, MemSet, ObjectIdGetDatum(), LargeObjectDesc::offset, open_lo_relation(), pfree(), PointerGetDatum(), RelationData::rd_att, RelationGetDescr, ScanKeyInit(), SET_VARSIZE(), LargeObjectDesc::snapshot, systable_beginscan_ordered(), systable_endscan_ordered(), systable_getnext_ordered(), HeapTupleData::t_self, values, VARDATA(), and VARHDRSZ.
Referenced by be_lo_from_bytea(), be_lo_put(), lo_import_internal(), and lo_write().
Definition at line 73 of file inv_api.c.
References CurrentResourceOwner, index_open(), lo_heap_r, lo_index_r, RowExclusiveLock, table_open(), and TopTransactionResourceOwner.
Referenced by inv_getsize(), inv_read(), inv_truncate(), and inv_write().
Definition at line 56 of file inv_api.c.
Referenced by be_lo_unlink(), check_object_ownership(), has_lo_priv_byid(), and inv_open().
Definition at line 65 of file inv_api.c.
Referenced by close_lo_relation(), inv_getsize(), inv_read(), inv_truncate(), inv_write(), and open_lo_relation().
Definition at line 66 of file inv_api.c.
Referenced by close_lo_relation(), inv_getsize(), inv_read(), inv_truncate(), inv_write(), and open_lo_relation().