pg_largeobject.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*-------------------------------------------------------------------------
  2. *
  3. * pg_largeobject.h
  4. * definition of the "large object" system catalog (pg_largeobject)
  5. *
  6. *
  7. * Portions Copyright (c) 1996-2022, 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. #include "catalog/genbki.h"
  21. #include "catalog/pg_largeobject_d.h"
  22. /* ----------------
  23. * pg_largeobject definition. cpp turns this into
  24. * typedef struct FormData_pg_largeobject
  25. * ----------------
  26. */
  27. CATALOG(pg_largeobject,2613,LargeObjectRelationId)
  28. {
  29. Oid loid BKI_LOOKUP(pg_largeobject_metadata); /* Identifier of large
  30. * 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
  34. * zero-length) */
  35. } FormData_pg_largeobject;
  36. /* ----------------
  37. * Form_pg_largeobject corresponds to a pointer to a tuple with
  38. * the format of pg_largeobject relation.
  39. * ----------------
  40. */
  41. typedef FormData_pg_largeobject *Form_pg_largeobject;
  42. DECLARE_UNIQUE_INDEX_PKEY(pg_largeobject_loid_pn_index, 2683, LargeObjectLOidPNIndexId, on pg_largeobject using btree(loid oid_ops, pageno int4_ops));
  43. extern Oid LargeObjectCreate(Oid loid);
  44. extern void LargeObjectDrop(Oid loid);
  45. extern bool LargeObjectExists(Oid loid);
  46. #endif /* PG_LARGEOBJECT_H */