pg_rewrite.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*-------------------------------------------------------------------------
  2. *
  3. * pg_rewrite.h
  4. * definition of the system "rewrite-rule" relation (pg_rewrite)
  5. * along with the relation's initial contents.
  6. *
  7. * As of Postgres 7.3, the primary key for this table is <ev_class, rulename>
  8. * --- ie, rule names are only unique among the rules of a given table.
  9. *
  10. *
  11. * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
  12. * Portions Copyright (c) 1994, Regents of the University of California
  13. *
  14. * src/include/catalog/pg_rewrite.h
  15. *
  16. * NOTES
  17. * the genbki.pl script reads this file and generates .bki
  18. * information from the DATA() statements.
  19. *
  20. *-------------------------------------------------------------------------
  21. */
  22. #ifndef PG_REWRITE_H
  23. #define PG_REWRITE_H
  24. #include "catalog/genbki.h"
  25. /* ----------------
  26. * pg_rewrite definition. cpp turns this into
  27. * typedef struct FormData_pg_rewrite
  28. * ----------------
  29. */
  30. #define RewriteRelationId 2618
  31. CATALOG(pg_rewrite,2618)
  32. {
  33. NameData rulename;
  34. Oid ev_class;
  35. char ev_type;
  36. char ev_enabled;
  37. bool is_instead;
  38. #ifdef CATALOG_VARLEN /* variable-length fields start here */
  39. pg_node_tree ev_qual;
  40. pg_node_tree ev_action;
  41. #endif
  42. } FormData_pg_rewrite;
  43. /* ----------------
  44. * Form_pg_rewrite corresponds to a pointer to a tuple with
  45. * the format of pg_rewrite relation.
  46. * ----------------
  47. */
  48. typedef FormData_pg_rewrite *Form_pg_rewrite;
  49. /* ----------------
  50. * compiler constants for pg_rewrite
  51. * ----------------
  52. */
  53. #define Natts_pg_rewrite 7
  54. #define Anum_pg_rewrite_rulename 1
  55. #define Anum_pg_rewrite_ev_class 2
  56. #define Anum_pg_rewrite_ev_type 3
  57. #define Anum_pg_rewrite_ev_enabled 4
  58. #define Anum_pg_rewrite_is_instead 5
  59. #define Anum_pg_rewrite_ev_qual 6
  60. #define Anum_pg_rewrite_ev_action 7
  61. #endif /* PG_REWRITE_H */