PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
pg_largeobject.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * pg_largeobject.h
4  * definition of the system "largeobject" relation (pg_largeobject)
5  * along with the relation's initial contents.
6  *
7  *
8  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
9  * Portions Copyright (c) 1994, Regents of the University of California
10  *
11  * src/include/catalog/pg_largeobject.h
12  *
13  * NOTES
14  * the genbki.pl script reads this file and generates .bki
15  * information from the DATA() statements.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PG_LARGEOBJECT_H
20 #define PG_LARGEOBJECT_H
21 
22 #include "catalog/genbki.h"
23 
24 /* ----------------
25  * pg_largeobject definition. cpp turns this into
26  * typedef struct FormData_pg_largeobject
27  * ----------------
28  */
29 #define LargeObjectRelationId 2613
30 
31 CATALOG(pg_largeobject,2613) BKI_WITHOUT_OIDS
32 {
33  Oid loid; /* Identifier of large 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 zero-length) */
39 
40 /* ----------------
41  * Form_pg_largeobject corresponds to a pointer to a tuple with
42  * the format of pg_largeobject relation.
43  * ----------------
44  */
46 
47 /* ----------------
48  * compiler constants for pg_largeobject
49  * ----------------
50  */
51 #define Natts_pg_largeobject 3
52 #define Anum_pg_largeobject_loid 1
53 #define Anum_pg_largeobject_pageno 2
54 #define Anum_pg_largeobject_data 3
55 
56 extern Oid LargeObjectCreate(Oid loid);
57 extern void LargeObjectDrop(Oid loid);
58 extern bool LargeObjectExists(Oid loid);
59 
60 #endif /* PG_LARGEOBJECT_H */
FormData_pg_largeobject
unsigned int Oid
Definition: postgres_ext.h:31
signed int int32
Definition: c.h:253
#define BKI_WITHOUT_OIDS
Definition: genbki.h:28
#define BKI_FORCE_NOT_NULL
Definition: genbki.h:32
CATALOG(pg_largeobject, 2613) BKI_WITHOUT_OIDS
bool LargeObjectExists(Oid loid)
void LargeObjectDrop(Oid loid)
Definition: c.h:434
FormData_pg_largeobject * Form_pg_largeobject
Oid LargeObjectCreate(Oid loid)