pg_largeobject.h 1.7 KB

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