23 #include "utils/fmgroids.h"
41 bool nulls[Natts_pg_largeobject_metadata];
43 pg_lo_meta =
table_open(LargeObjectMetadataRelationId,
50 memset(nulls,
false,
sizeof(nulls));
56 LargeObjectMetadataOidIndexId,
57 Anum_pg_largeobject_metadata_oid);
60 values[Anum_pg_largeobject_metadata_lomowner - 1]
62 nulls[Anum_pg_largeobject_metadata_lomacl - 1] =
true;
89 pg_lo_meta =
table_open(LargeObjectMetadataRelationId,
92 pg_largeobject =
table_open(LargeObjectRelationId,
99 Anum_pg_largeobject_metadata_oid,
104 LargeObjectMetadataOidIndexId,
true,
110 (
errcode(ERRCODE_UNDEFINED_OBJECT),
111 errmsg(
"large object %u does not exist", loid)));
121 Anum_pg_largeobject_loid,
126 LargeObjectLOidPNIndexId,
true,
171 Anum_pg_largeobject_metadata_oid,
175 pg_lo_meta =
table_open(LargeObjectMetadataRelationId,
179 LargeObjectMetadataOidIndexId,
true,
static Datum values[MAXATTR]
#define OidIsValid(objectId)
Oid GetNewOidWithIndex(Relation relation, Oid indexId, AttrNumber oidcolumn)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
void systable_endscan(SysScanDesc sysscan)
HeapTuple systable_getnext(SysScanDesc sysscan)
SysScanDesc systable_beginscan(Relation heapRelation, Oid indexId, bool indexOK, Snapshot snapshot, int nkeys, ScanKey key)
HeapTuple heap_form_tuple(TupleDesc tupleDescriptor, const Datum *values, const bool *isnull)
void heap_freetuple(HeapTuple htup)
#define HeapTupleIsValid(tuple)
void CatalogTupleInsert(Relation heapRel, HeapTuple tup)
void CatalogTupleDelete(Relation heapRel, ItemPointer tid)
void LargeObjectDrop(Oid loid)
bool LargeObjectExistsWithSnapshot(Oid loid, Snapshot snapshot)
bool LargeObjectExists(Oid loid)
Oid LargeObjectCreate(Oid loid)
static Datum ObjectIdGetDatum(Oid X)
#define RelationGetDescr(relation)
void ScanKeyInit(ScanKey entry, AttrNumber attributeNumber, StrategyNumber strategy, RegProcedure procedure, Datum argument)
#define BTEqualStrategyNumber
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_open(Oid relationId, LOCKMODE lockmode)