pg_attrdef.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*-------------------------------------------------------------------------
  2. *
  3. * pg_attrdef.h
  4. * definition of the system "attribute defaults" relation (pg_attrdef)
  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_attrdef.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_ATTRDEF_H
  20. #define PG_ATTRDEF_H
  21. #include "catalog/genbki.h"
  22. /* ----------------
  23. * pg_attrdef definition. cpp turns this into
  24. * typedef struct FormData_pg_attrdef
  25. * ----------------
  26. */
  27. #define AttrDefaultRelationId 2604
  28. CATALOG(pg_attrdef,2604)
  29. {
  30. Oid adrelid; /* OID of table containing attribute */
  31. int16 adnum; /* attnum of attribute */
  32. #ifdef CATALOG_VARLEN /* variable-length fields start here */
  33. pg_node_tree adbin; /* nodeToString representation of default */
  34. text adsrc; /* human-readable representation of default */
  35. #endif
  36. } FormData_pg_attrdef;
  37. /* ----------------
  38. * Form_pg_attrdef corresponds to a pointer to a tuple with
  39. * the format of pg_attrdef relation.
  40. * ----------------
  41. */
  42. typedef FormData_pg_attrdef *Form_pg_attrdef;
  43. /* ----------------
  44. * compiler constants for pg_attrdef
  45. * ----------------
  46. */
  47. #define Natts_pg_attrdef 4
  48. #define Anum_pg_attrdef_adrelid 1
  49. #define Anum_pg_attrdef_adnum 2
  50. #define Anum_pg_attrdef_adbin 3
  51. #define Anum_pg_attrdef_adsrc 4
  52. #endif /* PG_ATTRDEF_H */