1 /*-------------------------------------------------------------------------
4 * definition of the system "largeobject" relation (pg_largeobject)
5 * along with the relation's initial contents.
8 * Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group
9 * Portions Copyright (c) 1994, Regents of the University of California
11 * src/include/catalog/pg_largeobject.h
14 * the genbki.pl script reads this file and generates .bki
15 * information from the DATA() statements.
17 *-------------------------------------------------------------------------
19 #ifndef PG_LARGEOBJECT_H
20 #define PG_LARGEOBJECT_H
22 #include "catalog/genbki.h"
25 * pg_largeobject definition. cpp turns this into
26 * typedef struct FormData_pg_largeobject
29 #define LargeObjectRelationId 2613
31 CATALOG(pg_largeobject,2613) BKI_WITHOUT_OIDS
33 Oid loid; /* Identifier of large object */
34 int32 pageno; /* Page number (starting from 0) */
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) */
38 } FormData_pg_largeobject;
41 * Form_pg_largeobject corresponds to a pointer to a tuple with
42 * the format of pg_largeobject relation.
45 typedef FormData_pg_largeobject *Form_pg_largeobject;
48 * compiler constants for pg_largeobject
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
56 extern Oid LargeObjectCreate(Oid loid);
57 extern void LargeObjectDrop(Oid loid);
58 extern bool LargeObjectExists(Oid loid);
60 #endif /* PG_LARGEOBJECT_H */