| 1 | /*------------------------------------------------------------------------- |
| 2 | * |
| 3 | * pg_largeobject.h |
| 4 | * definition of the "large object" system catalog (pg_largeobject) |
| 5 | * |
| 6 | * |
| 7 | * Portions Copyright (c) 1996-2019, 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 | |
| 24 | /* ---------------- |
| 25 | * pg_largeobject definition. cpp turns this into |
| 26 | * typedef struct FormData_pg_largeobject |
| 27 | * ---------------- |
| 28 | */ |
| 29 | CATALOG(pg_largeobject,2613,LargeObjectRelationId) |
| 30 | { |
| 31 | Oid loid; /* Identifier of large object */ |
| 32 | int32 pageno; /* Page number (starting from 0) */ |
| 33 | |
| 34 | /* data has variable length, but we allow direct access; see inv_api.c */ |
| 35 | bytea data BKI_FORCE_NOT_NULL; /* Data for page (may be |
| 36 | * zero-length) */ |
| 37 | } FormData_pg_largeobject; |
| 38 | |
| 39 | /* ---------------- |
| 40 | * Form_pg_largeobject corresponds to a pointer to a tuple with |
| 41 | * the format of pg_largeobject relation. |
| 42 | * ---------------- |
| 43 | */ |
| 44 | typedef FormData_pg_largeobject *Form_pg_largeobject; |
| 45 | |
| 46 | extern Oid LargeObjectCreate(Oid loid); |
| 47 | extern void LargeObjectDrop(Oid loid); |
| 48 | extern bool LargeObjectExists(Oid loid); |
| 49 | |
| 50 | #endif /* PG_LARGEOBJECT_H */ |
| 51 | |