prs2lock.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*-------------------------------------------------------------------------
  2. *
  3. * prs2lock.h
  4. * data structures for POSTGRES Rule System II (rewrite rules only)
  5. *
  6. * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
  7. * Portions Copyright (c) 1994, Regents of the University of California
  8. *
  9. * src/include/rewrite/prs2lock.h
  10. *
  11. *-------------------------------------------------------------------------
  12. */
  13. #ifndef PRS2LOCK_H
  14. #define PRS2LOCK_H
  15. #include "access/attnum.h"
  16. #include "nodes/pg_list.h"
  17. /*
  18. * RewriteRule -
  19. * holds an info for a rewrite rule
  20. *
  21. */
  22. typedef struct RewriteRule
  23. {
  24. Oid ruleId;
  25. CmdType event;
  26. Node *qual;
  27. List *actions;
  28. char enabled;
  29. bool isInstead;
  30. } RewriteRule;
  31. /*
  32. * RuleLock -
  33. * all rules that apply to a particular relation. Even though we only
  34. * have the rewrite rule system left and these are not really "locks",
  35. * the name is kept for historical reasons.
  36. */
  37. typedef struct RuleLock
  38. {
  39. int numLocks;
  40. RewriteRule **rules;
  41. } RuleLock;
  42. #endif /* PRS2LOCK_H */