Header And Logo

PostgreSQL
| The world's most advanced open source database.

pg_largeobject.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * pg_largeobject.h
00004  *    definition of the system "largeobject" relation (pg_largeobject)
00005  *    along with the relation's initial contents.
00006  *
00007  *
00008  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
00009  * Portions Copyright (c) 1994, Regents of the University of California
00010  *
00011  * src/include/catalog/pg_largeobject.h
00012  *
00013  * NOTES
00014  *    the genbki.pl script reads this file and generates .bki
00015  *    information from the DATA() statements.
00016  *
00017  *-------------------------------------------------------------------------
00018  */
00019 #ifndef PG_LARGEOBJECT_H
00020 #define PG_LARGEOBJECT_H
00021 
00022 #include "catalog/genbki.h"
00023 
00024 /* ----------------
00025  *      pg_largeobject definition.  cpp turns this into
00026  *      typedef struct FormData_pg_largeobject
00027  * ----------------
00028  */
00029 #define LargeObjectRelationId  2613
00030 
00031 CATALOG(pg_largeobject,2613) BKI_WITHOUT_OIDS
00032 {
00033     Oid         loid;           /* Identifier of large object */
00034     int32       pageno;         /* Page number (starting from 0) */
00035 
00036     /* data has variable length, but we allow direct access; see inv_api.c */
00037     bytea       data;           /* Data for page (may be zero-length) */
00038 } FormData_pg_largeobject;
00039 
00040 /* ----------------
00041  *      Form_pg_largeobject corresponds to a pointer to a tuple with
00042  *      the format of pg_largeobject relation.
00043  * ----------------
00044  */
00045 typedef FormData_pg_largeobject *Form_pg_largeobject;
00046 
00047 /* ----------------
00048  *      compiler constants for pg_largeobject
00049  * ----------------
00050  */
00051 #define Natts_pg_largeobject            3
00052 #define Anum_pg_largeobject_loid        1
00053 #define Anum_pg_largeobject_pageno      2
00054 #define Anum_pg_largeobject_data        3
00055 
00056 extern Oid  LargeObjectCreate(Oid loid);
00057 extern void LargeObjectDrop(Oid loid);
00058 extern bool LargeObjectExists(Oid loid);
00059 
00060 #endif   /* PG_LARGEOBJECT_H */