PostgreSQL Source Code  git master
pg_largeobject.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * pg_largeobject.h
4  * definition of the "large object" system catalog (pg_largeobject)
5  *
6  *
7  * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/catalog/pg_largeobject.h
11  *
12  * NOTES
13  * The Catalog.pm module reads this file and derives schema
14  * information.
15  *
16  *-------------------------------------------------------------------------
17  */
18 #ifndef PG_LARGEOBJECT_H
19 #define PG_LARGEOBJECT_H
20 
21 #include "catalog/genbki.h"
22 #include "catalog/pg_largeobject_d.h"
23 #include "utils/snapshot.h"
24 
25 /* ----------------
26  * pg_largeobject definition. cpp turns this into
27  * typedef struct FormData_pg_largeobject
28  * ----------------
29  */
30 CATALOG(pg_largeobject,2613,LargeObjectRelationId)
31 {
32  Oid loid BKI_LOOKUP(pg_largeobject_metadata); /* Identifier of large
33  * object */
34  int32 pageno; /* Page number (starting from 0) */
35 
36  /* data has variable length, but we allow direct access; see inv_api.c */
37  bytea data BKI_FORCE_NOT_NULL; /* Data for page (may be
38  * zero-length) */
40 
41 /* ----------------
42  * Form_pg_largeobject corresponds to a pointer to a tuple with
43  * the format of pg_largeobject relation.
44  * ----------------
45  */
47 
48 DECLARE_UNIQUE_INDEX_PKEY(pg_largeobject_loid_pn_index, 2683, LargeObjectLOidPNIndexId, pg_largeobject, btree(loid oid_ops, pageno int4_ops));
49 
50 extern Oid LargeObjectCreate(Oid loid);
51 extern void LargeObjectDrop(Oid loid);
52 extern bool LargeObjectExists(Oid loid);
53 extern bool LargeObjectExistsWithSnapshot(Oid loid, Snapshot snapshot);
54 
55 #endif /* PG_LARGEOBJECT_H */
signed int int32
Definition: c.h:497
#define BKI_LOOKUP(catalog)
Definition: genbki.h:46
#define BKI_FORCE_NOT_NULL
Definition: genbki.h:33
const void * data
FormData_pg_largeobject * Form_pg_largeobject
void LargeObjectDrop(Oid loid)
DECLARE_UNIQUE_INDEX_PKEY(pg_largeobject_loid_pn_index, 2683, LargeObjectLOidPNIndexId, pg_largeobject, btree(loid oid_ops, pageno int4_ops))
bool LargeObjectExistsWithSnapshot(Oid loid, Snapshot snapshot)
CATALOG(pg_largeobject, 2613, LargeObjectRelationId)
FormData_pg_largeobject
bool LargeObjectExists(Oid loid)
Oid LargeObjectCreate(Oid loid)
unsigned int Oid
Definition: postgres_ext.h:31
Definition: c.h:690