yb_ddl_parser 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (926) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +177 -0
  3. data/LICENSES/Apache-2.0.txt +4 -0
  4. data/LICENSES/PostgreSQL.txt +24 -0
  5. data/README.md +93 -0
  6. data/THIRD_PARTY_NOTICES.md +47 -0
  7. data/VERSION +1 -0
  8. data/ext/yb_ddl_parser/extconf.rb +41 -0
  9. data/ext/yb_ddl_parser/vendor/compat/postgres/pg_config.h +1021 -0
  10. data/ext/yb_ddl_parser/vendor/compat/postgres/pg_config_ext.h +8 -0
  11. data/ext/yb_ddl_parser/vendor/compat/postgres/pg_config_os.h +8 -0
  12. data/ext/yb_ddl_parser/vendor/compat/postgres/yb/yql/pggate/util/ybc_util.h +53 -0
  13. data/ext/yb_ddl_parser/vendor/compat/postgres/yb/yql/pggate/ybc_dist_trace.h +12 -0
  14. data/ext/yb_ddl_parser/vendor/compat/postgres/yb/yql/pggate/ybc_gflags.h +17 -0
  15. data/ext/yb_ddl_parser/vendor/compat/postgres/yb/yql/pggate/ybc_pg_typedefs.h +184 -0
  16. data/ext/yb_ddl_parser/vendor/compat/postgres/yb/yql/pggate/ybc_pggate.h +6 -0
  17. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/backend/nodes/list.c +1676 -0
  18. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/backend/nodes/makefuncs.c +824 -0
  19. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/backend/nodes/nodes.c +31 -0
  20. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/backend/nodes/outfuncs.c +4948 -0
  21. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/backend/nodes/value.c +83 -0
  22. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/backend/parser/gram.c +52142 -0
  23. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/backend/parser/gram.h +1135 -0
  24. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/backend/parser/parser.c +501 -0
  25. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/backend/parser/scan.c +9319 -0
  26. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/backend/parser/scansup.c +127 -0
  27. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/common/keywords.c +48 -0
  28. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/common/kwlist_d.h +1128 -0
  29. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/common/kwlookup.c +85 -0
  30. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/amapi.h +399 -0
  31. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/amvalidate.h +40 -0
  32. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/attmap.h +53 -0
  33. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/attnum.h +64 -0
  34. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/brin.h +55 -0
  35. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/brin_internal.h +115 -0
  36. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/brin_page.h +96 -0
  37. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/brin_pageops.h +38 -0
  38. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/brin_revmap.h +41 -0
  39. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/brin_tuple.h +112 -0
  40. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/brin_xlog.h +151 -0
  41. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/bufmask.h +32 -0
  42. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/clog.h +63 -0
  43. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/commit_ts.h +74 -0
  44. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/detoast.h +82 -0
  45. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/genam.h +267 -0
  46. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/generic_xlog.h +45 -0
  47. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/gin.h +78 -0
  48. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/gin_private.h +500 -0
  49. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/ginblock.h +346 -0
  50. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/ginxlog.h +216 -0
  51. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/gist.h +248 -0
  52. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/gist_private.h +571 -0
  53. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/gistscan.h +24 -0
  54. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/gistxlog.h +114 -0
  55. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/hash.h +485 -0
  56. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/hash_xlog.h +267 -0
  57. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/heapam.h +242 -0
  58. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/heapam_xlog.h +420 -0
  59. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/heaptoast.h +151 -0
  60. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/hio.h +43 -0
  61. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/htup.h +90 -0
  62. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/htup_details.h +812 -0
  63. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/itup.h +181 -0
  64. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/multixact.h +164 -0
  65. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/nbtree.h +1293 -0
  66. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/nbtxlog.h +351 -0
  67. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/parallel.h +82 -0
  68. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/printsimple.h +23 -0
  69. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/printtup.h +35 -0
  70. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/relation.h +28 -0
  71. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/reloptions.h +275 -0
  72. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/relscan.h +242 -0
  73. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/rewriteheap.h +57 -0
  74. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/rmgr.h +62 -0
  75. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/rmgrlist.h +49 -0
  76. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/sdir.h +58 -0
  77. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/session.h +44 -0
  78. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/skey.h +229 -0
  79. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/slru.h +174 -0
  80. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/spgist.h +229 -0
  81. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/spgist_private.h +549 -0
  82. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/spgxlog.h +257 -0
  83. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/stratnum.h +85 -0
  84. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/subtrans.h +29 -0
  85. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/syncscan.h +25 -0
  86. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/sysattr.h +45 -0
  87. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/table.h +28 -0
  88. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/tableam.h +2127 -0
  89. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/timeline.h +44 -0
  90. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/toast_compression.h +73 -0
  91. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/toast_helper.h +116 -0
  92. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/toast_internals.h +63 -0
  93. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/transam.h +403 -0
  94. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/tsmapi.h +82 -0
  95. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/tupconvert.h +54 -0
  96. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/tupdesc.h +154 -0
  97. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/tupdesc_details.h +28 -0
  98. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/tupmacs.h +247 -0
  99. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/twophase.h +65 -0
  100. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/twophase_rmgr.h +40 -0
  101. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/valid.h +69 -0
  102. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/visibilitymap.h +42 -0
  103. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/visibilitymapdefs.h +25 -0
  104. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/xact.h +586 -0
  105. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/xlog.h +305 -0
  106. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/xlog_internal.h +366 -0
  107. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/xlogarchive.h +35 -0
  108. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/xlogdefs.h +101 -0
  109. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/xloginsert.h +66 -0
  110. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/xlogprefetcher.h +55 -0
  111. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/xlogreader.h +450 -0
  112. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/xlogrecord.h +236 -0
  113. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/xlogrecovery.h +157 -0
  114. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/xlogstats.h +43 -0
  115. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/xlogutils.h +118 -0
  116. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/yb_pg_inherits_scan.h +36 -0
  117. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/yb_scan.h +421 -0
  118. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/yb_sys_scan_base.h +41 -0
  119. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/ybgin.h +75 -0
  120. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/access/ybgin_private.h +51 -0
  121. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/backup/backup_manifest.h +54 -0
  122. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/backup/basebackup.h +39 -0
  123. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/backup/basebackup_sink.h +301 -0
  124. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/backup/basebackup_target.h +66 -0
  125. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/bootstrap/bootstrap.h +62 -0
  126. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/bootstrap/yb_bootstrap.h +44 -0
  127. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/c.h +1424 -0
  128. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/binary_upgrade.h +42 -0
  129. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/catalog.h +70 -0
  130. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/catversion.h +59 -0
  131. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/dependency.h +296 -0
  132. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/genbki.h +143 -0
  133. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/heap.h +165 -0
  134. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/index.h +268 -0
  135. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/indexing.h +57 -0
  136. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/namespace.h +190 -0
  137. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/objectaccess.h +265 -0
  138. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/objectaddress.h +93 -0
  139. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/partition.h +34 -0
  140. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_aggregate.h +180 -0
  141. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_aggregate_d.h +78 -0
  142. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_am.h +63 -0
  143. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_am_d.h +49 -0
  144. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_amop.h +102 -0
  145. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_amop_d.h +44 -0
  146. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_amproc.h +73 -0
  147. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_amproc_d.h +35 -0
  148. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_attrdef.h +70 -0
  149. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_attrdef_d.h +33 -0
  150. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_attribute.h +221 -0
  151. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_attribute_d.h +62 -0
  152. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_auth_members.h +48 -0
  153. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_auth_members_d.h +34 -0
  154. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_authid.h +63 -0
  155. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_authid_d.h +60 -0
  156. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_cast.h +102 -0
  157. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_cast_d.h +64 -0
  158. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_class.h +240 -0
  159. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_class_d.h +142 -0
  160. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_collation.h +98 -0
  161. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_collation_d.h +62 -0
  162. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_constraint.h +276 -0
  163. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_constraint_d.h +73 -0
  164. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_control.h +250 -0
  165. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_conversion.h +75 -0
  166. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_conversion_d.h +38 -0
  167. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_database.h +121 -0
  168. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_database_d.h +51 -0
  169. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_db_role_setting.h +61 -0
  170. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_db_role_setting_d.h +33 -0
  171. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_default_acl.h +73 -0
  172. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_default_acl_d.h +47 -0
  173. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_depend.h +77 -0
  174. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_depend_d.h +36 -0
  175. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_description.h +73 -0
  176. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_description_d.h +32 -0
  177. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_enum.h +66 -0
  178. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_enum_d.h +34 -0
  179. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_event_trigger.h +57 -0
  180. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_event_trigger_d.h +36 -0
  181. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_extension.h +59 -0
  182. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_extension_d.h +37 -0
  183. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_foreign_data_wrapper.h +58 -0
  184. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_foreign_data_wrapper_d.h +36 -0
  185. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_foreign_server.h +55 -0
  186. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_foreign_server_d.h +37 -0
  187. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_foreign_table.h +49 -0
  188. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_foreign_table_d.h +31 -0
  189. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_index.h +93 -0
  190. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_index_d.h +62 -0
  191. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_inherits.h +66 -0
  192. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_inherits_d.h +33 -0
  193. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_init_privs.h +83 -0
  194. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_init_privs_d.h +33 -0
  195. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_language.h +72 -0
  196. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_language_d.h +41 -0
  197. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_largeobject.h +53 -0
  198. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_largeobject_d.h +31 -0
  199. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_largeobject_metadata.h +51 -0
  200. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_largeobject_metadata_d.h +31 -0
  201. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_namespace.h +64 -0
  202. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_namespace_d.h +36 -0
  203. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_opclass.h +88 -0
  204. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_opclass_d.h +65 -0
  205. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_operator.h +107 -0
  206. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_operator_d.h +142 -0
  207. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_opfamily.h +63 -0
  208. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_opfamily_d.h +59 -0
  209. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_parameter_acl.h +60 -0
  210. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_parameter_acl_d.h +34 -0
  211. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_partitioned_table.h +74 -0
  212. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_partitioned_table_d.h +36 -0
  213. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_policy.h +58 -0
  214. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_policy_d.h +37 -0
  215. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_proc.h +220 -0
  216. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_proc_d.h +101 -0
  217. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_publication.h +168 -0
  218. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_publication_d.h +38 -0
  219. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_publication_namespace.h +47 -0
  220. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_publication_namespace_d.h +32 -0
  221. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_publication_rel.h +54 -0
  222. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_publication_rel_d.h +35 -0
  223. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_range.h +72 -0
  224. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_range_d.h +36 -0
  225. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_replication_origin.h +62 -0
  226. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_replication_origin_d.h +33 -0
  227. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_rewrite.h +59 -0
  228. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_rewrite_d.h +37 -0
  229. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_seclabel.h +45 -0
  230. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_seclabel_d.h +33 -0
  231. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_sequence.h +44 -0
  232. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_sequence_d.h +36 -0
  233. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_shdepend.h +78 -0
  234. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_shdepend_d.h +36 -0
  235. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_shdescription.h +65 -0
  236. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_shdescription_d.h +33 -0
  237. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_shseclabel.h +46 -0
  238. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_shseclabel_d.h +35 -0
  239. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_statistic.h +282 -0
  240. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_statistic_d.h +195 -0
  241. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_statistic_ext.h +88 -0
  242. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_statistic_ext_d.h +45 -0
  243. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_statistic_ext_data.h +60 -0
  244. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_statistic_ext_data_d.h +34 -0
  245. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_subscription.h +131 -0
  246. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_subscription_d.h +46 -0
  247. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_subscription_rel.h +94 -0
  248. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_subscription_rel_d.h +51 -0
  249. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_tablespace.h +55 -0
  250. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_tablespace_d.h +38 -0
  251. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_transform.h +48 -0
  252. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_transform_d.h +34 -0
  253. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_trigger.h +153 -0
  254. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_trigger_d.h +109 -0
  255. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_ts_config.h +53 -0
  256. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_ts_config_d.h +34 -0
  257. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_ts_config_map.h +49 -0
  258. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_ts_config_map_d.h +32 -0
  259. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_ts_dict.h +59 -0
  260. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_ts_dict_d.h +35 -0
  261. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_ts_parser.h +60 -0
  262. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_ts_parser_d.h +37 -0
  263. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_ts_template.h +51 -0
  264. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_ts_template_d.h +34 -0
  265. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_type.h +411 -0
  266. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_type_d.h +324 -0
  267. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_user_mapping.h +55 -0
  268. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_user_mapping_d.h +33 -0
  269. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_yb_catalog_version.h +53 -0
  270. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_yb_catalog_version_d.h +32 -0
  271. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_yb_invalidation_messages.h +55 -0
  272. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_yb_invalidation_messages_d.h +33 -0
  273. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_yb_logical_client_version.h +46 -0
  274. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_yb_logical_client_version_d.h +31 -0
  275. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_yb_migration.h +58 -0
  276. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_yb_migration_d.h +32 -0
  277. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_yb_profile.h +47 -0
  278. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_yb_profile_d.h +34 -0
  279. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_yb_role_profile.h +58 -0
  280. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_yb_role_profile_d.h +35 -0
  281. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_yb_tablegroup.h +50 -0
  282. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/pg_yb_tablegroup_d.h +35 -0
  283. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/schemapg.h +276 -0
  284. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/storage.h +50 -0
  285. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/storage_xlog.h +59 -0
  286. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/system_fk_info.h +253 -0
  287. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/toasting.h +30 -0
  288. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/yb_catalog_version.h +65 -0
  289. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/yb_logical_client_version.h +40 -0
  290. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/yb_oid_assignment.h +39 -0
  291. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/catalog/yb_type.h +68 -0
  292. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/alter.h +35 -0
  293. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/async.h +62 -0
  294. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/cluster.h +55 -0
  295. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/collationcmds.h +25 -0
  296. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/comment.h +45 -0
  297. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/conversioncmds.h +23 -0
  298. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/copy.h +120 -0
  299. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/copyfrom_internal.h +176 -0
  300. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/createas.h +34 -0
  301. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/dbcommands.h +36 -0
  302. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/dbcommands_xlog.h +60 -0
  303. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/defrem.h +169 -0
  304. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/discard.h +20 -0
  305. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/event_trigger.h +96 -0
  306. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/explain.h +159 -0
  307. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/extension.h +55 -0
  308. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/lockcmds.h +24 -0
  309. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/matview.h +34 -0
  310. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/policy.h +41 -0
  311. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/portalcmds.h +34 -0
  312. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/prepare.h +62 -0
  313. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/proclang.h +23 -0
  314. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/progress.h +173 -0
  315. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/publicationcmds.h +39 -0
  316. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/schemacmds.h +29 -0
  317. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/seclabel.h +34 -0
  318. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/sequence.h +70 -0
  319. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/subscriptioncmds.h +29 -0
  320. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/tablecmds.h +108 -0
  321. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/tablespace.h +82 -0
  322. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/trigger.h +323 -0
  323. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/typecmds.h +61 -0
  324. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/user.h +37 -0
  325. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/vacuum.h +340 -0
  326. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/variable.h +50 -0
  327. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/view.h +25 -0
  328. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/yb_cmds.h +168 -0
  329. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/yb_profile.h +51 -0
  330. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/commands/yb_tablegroup.h +45 -0
  331. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/archive.h +21 -0
  332. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/base64.h +19 -0
  333. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/checksum_helper.h +72 -0
  334. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/compression.h +45 -0
  335. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/config_info.h +21 -0
  336. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/connect.h +28 -0
  337. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/controldata_utils.h +19 -0
  338. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/cryptohash.h +39 -0
  339. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/fe_memutils.h +73 -0
  340. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/file_perm.h +56 -0
  341. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/file_utils.h +40 -0
  342. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/hashfn.h +104 -0
  343. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/hmac.h +30 -0
  344. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/int.h +441 -0
  345. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/int128.h +276 -0
  346. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/ip.h +31 -0
  347. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/jsonapi.h +169 -0
  348. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/keywords.h +29 -0
  349. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/kwlookup.h +44 -0
  350. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/link-canary.h +17 -0
  351. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/logging.h +158 -0
  352. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/md5.h +37 -0
  353. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/openssl.h +49 -0
  354. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/pg_lzcompress.h +93 -0
  355. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/pg_prng.h +60 -0
  356. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/pg_yb_common.h +160 -0
  357. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/pg_yb_param_status_flags.h +33 -0
  358. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/relpath.h +90 -0
  359. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/restricted_token.h +24 -0
  360. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/saslprep.h +30 -0
  361. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/scram-common.h +62 -0
  362. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/sha1.h +21 -0
  363. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/sha2.h +32 -0
  364. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/shortest_dec.h +63 -0
  365. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/string.h +42 -0
  366. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/unicode_combining_table.h +308 -0
  367. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/unicode_east_asian_fw_table.h +125 -0
  368. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/unicode_norm.h +39 -0
  369. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/unicode_norm_hashfunc.h +2956 -0
  370. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/unicode_norm_table.h +9042 -0
  371. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/unicode_normprops_table.h +7849 -0
  372. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/common/username.h +15 -0
  373. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/datatype/timestamp.h +236 -0
  374. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/execAsync.h +25 -0
  375. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/execExpr.h +792 -0
  376. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/execParallel.h +51 -0
  377. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/execPartition.h +134 -0
  378. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/execdebug.h +130 -0
  379. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/execdesc.h +77 -0
  380. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/executor.h +718 -0
  381. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/functions.h +61 -0
  382. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/hashjoin.h +363 -0
  383. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/instrument.h +154 -0
  384. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeAgg.h +333 -0
  385. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeAppend.h +30 -0
  386. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeBitmapAnd.h +24 -0
  387. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeBitmapHeapscan.h +32 -0
  388. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeBitmapIndexscan.h +24 -0
  389. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeBitmapOr.h +24 -0
  390. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeCtescan.h +23 -0
  391. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeCustom.h +42 -0
  392. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeForeignscan.h +44 -0
  393. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeFunctionscan.h +23 -0
  394. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeGather.h +24 -0
  395. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeGatherMerge.h +26 -0
  396. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeGroup.h +23 -0
  397. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeHash.h +79 -0
  398. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeHashjoin.h +34 -0
  399. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeIncrementalSort.h +28 -0
  400. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeIndexonlyscan.h +36 -0
  401. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeIndexscan.h +47 -0
  402. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeLimit.h +23 -0
  403. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeLockRows.h +26 -0
  404. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeMaterial.h +25 -0
  405. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeMemoize.h +32 -0
  406. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeMergeAppend.h +23 -0
  407. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeMergejoin.h +23 -0
  408. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeModifyTable.h +33 -0
  409. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeNamedtuplestorescan.h +23 -0
  410. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeNestloop.h +23 -0
  411. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeProjectSet.h +23 -0
  412. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeRecursiveunion.h +23 -0
  413. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeResult.h +25 -0
  414. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeSamplescan.h +23 -0
  415. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeSeqscan.h +31 -0
  416. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeSetOp.h +23 -0
  417. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeSort.h +32 -0
  418. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeSubplan.h +29 -0
  419. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeSubqueryscan.h +23 -0
  420. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeTableFuncscan.h +23 -0
  421. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeTidrangescan.h +24 -0
  422. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeTidscan.h +23 -0
  423. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeUnique.h +23 -0
  424. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeValuesscan.h +23 -0
  425. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeWindowAgg.h +23 -0
  426. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeWorktablescan.h +23 -0
  427. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeYbBatchedNestloop.h +33 -0
  428. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeYbBitmapIndexscan.h +24 -0
  429. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeYbBitmapTablescan.h +22 -0
  430. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/nodeYbSeqscan.h +45 -0
  431. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/spi.h +214 -0
  432. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/spi_priv.h +105 -0
  433. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/tablefunc.h +67 -0
  434. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/tqueue.h +32 -0
  435. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/tstoreReceiver.h +31 -0
  436. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/tuptable.h +515 -0
  437. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/ybExpr.h +64 -0
  438. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/ybFunction.h +41 -0
  439. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/ybModifyTable.h +281 -0
  440. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/executor/ybOptimizeModifyTable.h +40 -0
  441. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/fe_utils/archive.h +21 -0
  442. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/fe_utils/cancel.h +32 -0
  443. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/fe_utils/conditional.h +102 -0
  444. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/fe_utils/connect_utils.h +48 -0
  445. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/fe_utils/mbprint.h +29 -0
  446. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/fe_utils/option_utils.h +26 -0
  447. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/fe_utils/parallel_slot.h +77 -0
  448. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/fe_utils/print.h +220 -0
  449. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/fe_utils/psqlscan.h +90 -0
  450. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/fe_utils/psqlscan_int.h +157 -0
  451. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/fe_utils/query_utils.h +26 -0
  452. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/fe_utils/recovery_gen.h +28 -0
  453. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/fe_utils/simple_list.h +70 -0
  454. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/fe_utils/string_utils.h +69 -0
  455. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/fmgr.h +788 -0
  456. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/foreign/fdwapi.h +294 -0
  457. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/foreign/foreign.h +84 -0
  458. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/funcapi.h +409 -0
  459. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/getaddrinfo.h +162 -0
  460. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/getopt_long.h +36 -0
  461. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/jit/SectionMemoryManager.h +226 -0
  462. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/jit/jit.h +105 -0
  463. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/jit/llvmjit.h +169 -0
  464. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/jit/llvmjit_backport.h +25 -0
  465. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/jit/llvmjit_emit.h +336 -0
  466. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/lib/binaryheap.h +54 -0
  467. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/lib/bipartite_match.h +46 -0
  468. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/lib/bloomfilter.h +27 -0
  469. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/lib/dshash.h +112 -0
  470. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/lib/hyperloglog.h +68 -0
  471. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/lib/ilist.h +746 -0
  472. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/lib/integerset.h +24 -0
  473. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/lib/knapsack.h +16 -0
  474. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/lib/pairingheap.h +102 -0
  475. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/lib/qunique.h +67 -0
  476. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/lib/rbtree.h +79 -0
  477. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/lib/simplehash.h +1187 -0
  478. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/lib/sort_template.h +441 -0
  479. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/lib/stringinfo.h +161 -0
  480. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/libpq/auth.h +31 -0
  481. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/libpq/be-fsstubs.h +32 -0
  482. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/libpq/be-gssapi-common.h +30 -0
  483. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/libpq/crypt.h +53 -0
  484. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/libpq/hba.h +191 -0
  485. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/libpq/ifaddr.h +30 -0
  486. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/libpq/libpq-be.h +365 -0
  487. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/libpq/libpq-fs.h +24 -0
  488. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/libpq/libpq.h +147 -0
  489. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/libpq/pqcomm.h +194 -0
  490. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/libpq/pqformat.h +210 -0
  491. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/libpq/pqmq.h +24 -0
  492. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/libpq/pqsignal.h +42 -0
  493. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/libpq/sasl.h +136 -0
  494. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/libpq/scram.h +30 -0
  495. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/libpq/yb_pqcomm_extensions.h +24 -0
  496. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/mb/pg_wchar.h +703 -0
  497. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/mb/stringinfo_mb.h +24 -0
  498. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/miscadmin.h +558 -0
  499. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/nodes/bitmapset.h +122 -0
  500. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/nodes/execnodes.h +3130 -0
  501. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/nodes/extensible.h +162 -0
  502. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/nodes/lockoptions.h +61 -0
  503. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/nodes/makefuncs.h +109 -0
  504. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/nodes/memnodes.h +113 -0
  505. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/nodes/nodeFuncs.h +165 -0
  506. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/nodes/nodes.h +897 -0
  507. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/nodes/params.h +170 -0
  508. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/nodes/parsenodes.h +3955 -0
  509. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/nodes/pathnodes.h +2984 -0
  510. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/nodes/pg_list.h +621 -0
  511. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/nodes/plannodes.h +1681 -0
  512. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/nodes/primnodes.h +1608 -0
  513. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/nodes/print.h +34 -0
  514. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/nodes/readfuncs.h +40 -0
  515. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/nodes/replnodes.h +111 -0
  516. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/nodes/subscripting.h +167 -0
  517. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/nodes/supportnodes.h +302 -0
  518. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/nodes/tidbitmap.h +84 -0
  519. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/nodes/value.h +80 -0
  520. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/nodes/ybbitmatrix.h +54 -0
  521. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/nodes/ybtidbitmap.h +89 -0
  522. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/appendinfo.h +50 -0
  523. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/clauses.h +62 -0
  524. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/cost.h +309 -0
  525. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/geqo.h +90 -0
  526. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/geqo_copy.h +30 -0
  527. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/geqo_gene.h +45 -0
  528. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/geqo_misc.h +34 -0
  529. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/geqo_mutation.h +30 -0
  530. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/geqo_pool.h +40 -0
  531. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/geqo_random.h +40 -0
  532. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/geqo_recombination.h +89 -0
  533. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/geqo_selection.h +33 -0
  534. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/inherit.h +29 -0
  535. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/joininfo.h +30 -0
  536. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/optimizer.h +206 -0
  537. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/orclauses.h +21 -0
  538. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/paramassign.h +34 -0
  539. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/pathnode.h +359 -0
  540. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/paths.h +292 -0
  541. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/placeholder.h +32 -0
  542. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/plancat.h +82 -0
  543. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/planmain.h +136 -0
  544. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/planner.h +70 -0
  545. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/prep.h +57 -0
  546. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/restrictinfo.h +62 -0
  547. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/subselect.h +40 -0
  548. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/tlist.h +56 -0
  549. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/yb_merge_scan.h +52 -0
  550. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/optimizer/ybplan.h +59 -0
  551. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/parser/analyze.h +64 -0
  552. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/parser/gramparse.h +75 -0
  553. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/parser/kwlist.h +502 -0
  554. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/parser/parse_agg.h +63 -0
  555. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/parser/parse_clause.h +54 -0
  556. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/parser/parse_coerce.h +103 -0
  557. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/parser/parse_collate.h +27 -0
  558. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/parser/parse_cte.h +24 -0
  559. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/parser/parse_enr.h +22 -0
  560. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/parser/parse_expr.h +25 -0
  561. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/parser/parse_func.h +74 -0
  562. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/parser/parse_merge.h +21 -0
  563. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/parser/parse_node.h +339 -0
  564. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/parser/parse_oper.h +65 -0
  565. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/parser/parse_param.h +25 -0
  566. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/parser/parse_relation.h +124 -0
  567. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/parser/parse_target.h +58 -0
  568. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/parser/parse_type.h +60 -0
  569. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/parser/parse_utilcmd.h +57 -0
  570. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/parser/parser.h +68 -0
  571. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/parser/parsetree.h +61 -0
  572. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/parser/scanner.h +150 -0
  573. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/parser/scansup.h +27 -0
  574. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/partitioning/partbounds.h +146 -0
  575. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/partitioning/partdefs.h +26 -0
  576. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/partitioning/partdesc.h +53 -0
  577. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/partitioning/partprune.h +85 -0
  578. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/pg_config_manual.h +410 -0
  579. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/pg_getopt.h +56 -0
  580. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/pg_trace.h +17 -0
  581. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/pg_yb_utils.h +1645 -0
  582. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/pgstat.h +900 -0
  583. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/pgtar.h +45 -0
  584. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/pgtime.h +94 -0
  585. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/aix.h +14 -0
  586. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/atomics/arch-arm.h +32 -0
  587. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/atomics/arch-hppa.h +17 -0
  588. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/atomics/arch-ia64.h +29 -0
  589. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/atomics/arch-ppc.h +254 -0
  590. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/atomics/arch-x86.h +252 -0
  591. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/atomics/fallback.h +170 -0
  592. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/atomics/generic-acc.h +106 -0
  593. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/atomics/generic-gcc.h +286 -0
  594. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/atomics/generic-msvc.h +101 -0
  595. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/atomics/generic-sunpro.h +106 -0
  596. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/atomics/generic.h +401 -0
  597. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/atomics.h +524 -0
  598. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/cygwin.h +23 -0
  599. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/darwin.h +8 -0
  600. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/freebsd.h +10 -0
  601. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/hpux.h +3 -0
  602. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/linux.h +22 -0
  603. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/netbsd.h +1 -0
  604. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/openbsd.h +1 -0
  605. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/pg_bitutils.h +302 -0
  606. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/pg_bswap.h +161 -0
  607. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/pg_crc32c.h +101 -0
  608. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/pg_iovec.h +54 -0
  609. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/pg_pthread.h +41 -0
  610. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/solaris.h +26 -0
  611. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/win32/arpa/inet.h +3 -0
  612. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/win32/dlfcn.h +1 -0
  613. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/win32/grp.h +1 -0
  614. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/win32/netdb.h +1 -0
  615. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/win32/netinet/in.h +3 -0
  616. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/win32/pwd.h +3 -0
  617. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/win32/sys/socket.h +33 -0
  618. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/win32/sys/wait.h +3 -0
  619. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/win32.h +81 -0
  620. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/win32_msvc/dirent.h +34 -0
  621. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/win32_msvc/sys/file.h +1 -0
  622. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/win32_msvc/sys/param.h +1 -0
  623. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/win32_msvc/sys/time.h +1 -0
  624. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/win32_msvc/unistd.h +9 -0
  625. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/win32_msvc/utime.h +3 -0
  626. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/win32_port.h +572 -0
  627. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port/win32ntdll.h +32 -0
  628. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/port.h +589 -0
  629. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/portability/instr_time.h +256 -0
  630. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/portability/mem.h +48 -0
  631. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/postgres.h +819 -0
  632. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/postgres_ext.h +74 -0
  633. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/postgres_fe.h +29 -0
  634. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/postmaster/autovacuum.h +83 -0
  635. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/postmaster/auxprocess.h +20 -0
  636. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/postmaster/bgworker.h +176 -0
  637. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/postmaster/bgworker_internals.h +64 -0
  638. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/postmaster/bgwriter.h +45 -0
  639. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/postmaster/fork_process.h +17 -0
  640. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/postmaster/interrupt.h +32 -0
  641. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/postmaster/pgarch.h +73 -0
  642. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/postmaster/postmaster.h +86 -0
  643. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/postmaster/startup.h +41 -0
  644. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/postmaster/syslogger.h +103 -0
  645. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/postmaster/walwriter.h +21 -0
  646. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/regex/regcustom.h +104 -0
  647. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/regex/regerrs.h +87 -0
  648. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/regex/regex.h +269 -0
  649. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/regex/regexport.h +61 -0
  650. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/regex/regguts.h +552 -0
  651. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/replication/decode.h +34 -0
  652. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/replication/logical.h +178 -0
  653. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/replication/logicallauncher.h +29 -0
  654. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/replication/logicalproto.h +256 -0
  655. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/replication/logicalrelation.h +50 -0
  656. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/replication/logicalworker.h +19 -0
  657. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/replication/message.h +41 -0
  658. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/replication/origin.h +73 -0
  659. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/replication/output_plugin.h +271 -0
  660. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/replication/pgoutput.h +34 -0
  661. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/replication/reorderbuffer.h +706 -0
  662. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/replication/slot.h +290 -0
  663. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/replication/snapbuild.h +101 -0
  664. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/replication/syncrep.h +118 -0
  665. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/replication/walreceiver.h +472 -0
  666. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/replication/walsender.h +92 -0
  667. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/replication/walsender_private.h +131 -0
  668. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/replication/worker_internal.h +112 -0
  669. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/replication/yb_decode.h +33 -0
  670. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/replication/yb_virtual_wal_client.h +46 -0
  671. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/replication/yb_virtual_wal_client_typedefs.h +31 -0
  672. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/rewrite/prs2lock.h +46 -0
  673. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/rewrite/rewriteDefine.h +44 -0
  674. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/rewrite/rewriteHandler.h +35 -0
  675. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/rewrite/rewriteManip.h +87 -0
  676. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/rewrite/rewriteRemove.h +21 -0
  677. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/rewrite/rewriteSearchCycle.h +21 -0
  678. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/rewrite/rewriteSupport.h +26 -0
  679. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/rewrite/rowsecurity.h +49 -0
  680. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/rusagestub.h +34 -0
  681. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/header.h +67 -0
  682. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/api.h +32 -0
  683. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/header.h +61 -0
  684. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_ISO_8859_1_basque.h +15 -0
  685. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_ISO_8859_1_catalan.h +15 -0
  686. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_ISO_8859_1_danish.h +15 -0
  687. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_ISO_8859_1_dutch.h +15 -0
  688. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_ISO_8859_1_english.h +15 -0
  689. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_ISO_8859_1_finnish.h +15 -0
  690. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_ISO_8859_1_french.h +15 -0
  691. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_ISO_8859_1_german.h +15 -0
  692. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_ISO_8859_1_indonesian.h +15 -0
  693. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_ISO_8859_1_irish.h +15 -0
  694. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_ISO_8859_1_italian.h +15 -0
  695. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_ISO_8859_1_norwegian.h +15 -0
  696. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_ISO_8859_1_porter.h +15 -0
  697. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_ISO_8859_1_portuguese.h +15 -0
  698. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_ISO_8859_1_spanish.h +15 -0
  699. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_ISO_8859_1_swedish.h +15 -0
  700. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_ISO_8859_2_hungarian.h +15 -0
  701. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_ISO_8859_2_romanian.h +15 -0
  702. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_KOI8_R_russian.h +15 -0
  703. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_arabic.h +15 -0
  704. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_armenian.h +15 -0
  705. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_basque.h +15 -0
  706. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_catalan.h +15 -0
  707. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_danish.h +15 -0
  708. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_dutch.h +15 -0
  709. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_english.h +15 -0
  710. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_finnish.h +15 -0
  711. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_french.h +15 -0
  712. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_german.h +15 -0
  713. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_greek.h +15 -0
  714. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_hindi.h +15 -0
  715. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_hungarian.h +15 -0
  716. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_indonesian.h +15 -0
  717. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_irish.h +15 -0
  718. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_italian.h +15 -0
  719. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_lithuanian.h +15 -0
  720. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_nepali.h +15 -0
  721. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_norwegian.h +15 -0
  722. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_porter.h +15 -0
  723. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_portuguese.h +15 -0
  724. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_romanian.h +15 -0
  725. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_russian.h +15 -0
  726. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_serbian.h +15 -0
  727. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_spanish.h +15 -0
  728. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_swedish.h +15 -0
  729. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_tamil.h +15 -0
  730. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_turkish.h +15 -0
  731. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/snowball/libstemmer/stem_UTF_8_yiddish.h +15 -0
  732. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/statistics/extended_stats_internal.h +130 -0
  733. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/statistics/stat_utils.h +41 -0
  734. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/statistics/statistics.h +130 -0
  735. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/backendid.h +37 -0
  736. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/barrier.h +46 -0
  737. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/block.h +115 -0
  738. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/buf.h +46 -0
  739. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/buf_internals.h +345 -0
  740. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/buffile.h +57 -0
  741. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/bufmgr.h +297 -0
  742. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/bufpage.h +457 -0
  743. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/checksum.h +24 -0
  744. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/checksum_impl.h +215 -0
  745. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/condition_variable.h +86 -0
  746. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/copydir.h +19 -0
  747. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/dsm.h +64 -0
  748. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/dsm_impl.h +76 -0
  749. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/fd.h +198 -0
  750. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/fileset.h +40 -0
  751. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/freespace.h +39 -0
  752. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/fsm_internals.h +72 -0
  753. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/indexfsm.h +26 -0
  754. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/ipc.h +87 -0
  755. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/item.h +19 -0
  756. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/itemid.h +184 -0
  757. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/itemptr.h +208 -0
  758. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/large_object.h +100 -0
  759. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/latch.h +189 -0
  760. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/lmgr.h +119 -0
  761. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/lock.h +621 -0
  762. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/lockdefs.h +61 -0
  763. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/lwlock.h +220 -0
  764. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/lwlocknames.h +50 -0
  765. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/md.h +52 -0
  766. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/off.h +57 -0
  767. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/pg_sema.h +61 -0
  768. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/pg_shmem.h +95 -0
  769. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/pmsignal.h +105 -0
  770. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/predicate.h +87 -0
  771. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/predicate_internals.h +494 -0
  772. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/proc.h +530 -0
  773. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/procarray.h +101 -0
  774. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/proclist.h +219 -0
  775. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/proclist_types.h +51 -0
  776. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/procsignal.h +81 -0
  777. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/reinit.h +28 -0
  778. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/relfilenode.h +99 -0
  779. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/s_lock.h +1110 -0
  780. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/sharedfileset.h +37 -0
  781. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/shm_mq.h +86 -0
  782. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/shm_toc.h +58 -0
  783. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/shmem.h +81 -0
  784. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/sinval.h +219 -0
  785. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/sinvaladt.h +48 -0
  786. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/smgr.h +114 -0
  787. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/spin.h +96 -0
  788. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/standby.h +106 -0
  789. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/standbydefs.h +74 -0
  790. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/storage/sync.h +66 -0
  791. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/tcop/cmdtag.h +58 -0
  792. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/tcop/cmdtaglist.h +225 -0
  793. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/tcop/deparse_utility.h +108 -0
  794. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/tcop/dest.h +149 -0
  795. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/tcop/fastpath.h +20 -0
  796. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/tcop/pquery.h +60 -0
  797. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/tcop/tcopprot.h +108 -0
  798. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/tcop/utility.h +112 -0
  799. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/tsearch/dicts/regis.h +49 -0
  800. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/tsearch/dicts/spell.h +247 -0
  801. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/tsearch/ts_cache.h +98 -0
  802. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/tsearch/ts_locale.h +63 -0
  803. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/tsearch/ts_public.h +159 -0
  804. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/tsearch/ts_type.h +242 -0
  805. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/tsearch/ts_utils.h +266 -0
  806. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/acl.h +340 -0
  807. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/aclchk_internal.h +45 -0
  808. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/array.h +472 -0
  809. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/arrayaccess.h +118 -0
  810. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/ascii.h +68 -0
  811. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/attoptcache.h +28 -0
  812. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/backend_progress.h +44 -0
  813. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/backend_status.h +379 -0
  814. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/builtins.h +130 -0
  815. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/bytea.h +28 -0
  816. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/cash.h +25 -0
  817. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/catcache.h +268 -0
  818. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/combocid.h +28 -0
  819. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/date.h +90 -0
  820. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/datetime.h +344 -0
  821. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/datum.h +76 -0
  822. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/dsa.h +123 -0
  823. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/dynahash.h +20 -0
  824. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/elog.h +517 -0
  825. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/errcodes.h +363 -0
  826. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/evtcache.h +37 -0
  827. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/expandeddatum.h +159 -0
  828. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/expandedrecord.h +231 -0
  829. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/float.h +356 -0
  830. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/fmgroids.h +3337 -0
  831. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/fmgrprotos.h +2900 -0
  832. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/fmgrtab.h +53 -0
  833. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/formatting.h +35 -0
  834. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/freepage.h +99 -0
  835. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/geo_decls.h +221 -0
  836. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/guc.h +517 -0
  837. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/guc_tables.h +312 -0
  838. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/help_config.h +17 -0
  839. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/hsearch.h +153 -0
  840. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/index_selfuncs.h +74 -0
  841. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/inet.h +149 -0
  842. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/inval.h +74 -0
  843. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/json.h +24 -0
  844. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/jsonb.h +415 -0
  845. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/jsonfuncs.h +66 -0
  846. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/jsonpath.h +251 -0
  847. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/logtape.h +77 -0
  848. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/lsyscache.h +211 -0
  849. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/memdebug.h +82 -0
  850. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/memutils.h +306 -0
  851. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/multirangetypes.h +135 -0
  852. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/numeric.h +99 -0
  853. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/old_snapshot.h +75 -0
  854. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/palloc.h +222 -0
  855. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/partcache.h +105 -0
  856. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/pg_crc.h +107 -0
  857. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/pg_locale.h +129 -0
  858. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/pg_lsn.h +29 -0
  859. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/pg_rusage.h +37 -0
  860. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/pgstat_internal.h +803 -0
  861. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/pidfile.h +56 -0
  862. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/plancache.h +259 -0
  863. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/portal.h +252 -0
  864. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/ps_status.h +25 -0
  865. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/queryenvironment.h +74 -0
  866. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/queryjumble.h +88 -0
  867. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/rangetypes.h +151 -0
  868. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/regproc.h +39 -0
  869. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/rel.h +760 -0
  870. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/relcache.h +180 -0
  871. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/relfilenodemap.h +18 -0
  872. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/relmapper.h +72 -0
  873. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/relptr.h +93 -0
  874. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/reltrigger.h +81 -0
  875. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/resowner.h +86 -0
  876. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/resowner_private.h +123 -0
  877. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/rls.h +50 -0
  878. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/ruleutils.h +59 -0
  879. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/sampling.h +64 -0
  880. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/selfuncs.h +250 -0
  881. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/sharedtuplestore.h +61 -0
  882. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/snapmgr.h +189 -0
  883. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/snapshot.h +231 -0
  884. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/sortsupport.h +391 -0
  885. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/spccache.h +24 -0
  886. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/syscache.h +319 -0
  887. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/timeout.h +95 -0
  888. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/timestamp.h +120 -0
  889. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/tuplesort.h +291 -0
  890. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/tuplestore.h +91 -0
  891. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/typcache.h +209 -0
  892. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/tzparser.h +39 -0
  893. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/uuid.h +31 -0
  894. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/varbit.h +74 -0
  895. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/varlena.h +41 -0
  896. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/wait_event.h +351 -0
  897. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/xid8.h +22 -0
  898. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/xml.h +84 -0
  899. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/yb_inheritscache.h +49 -0
  900. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/yb_jumblefuncs.h +35 -0
  901. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/yb_like_support.h +37 -0
  902. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/yb_queryjumble.h +73 -0
  903. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/yb_rowtypes.h +24 -0
  904. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/utils/yb_tuplecache.h +66 -0
  905. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/windowapi.h +64 -0
  906. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/yb_ash.h +92 -0
  907. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/yb_file_utils.h +38 -0
  908. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/yb_overflow_utils.h +110 -0
  909. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/yb_qpm.h +45 -0
  910. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/yb_query_diagnostics.h +237 -0
  911. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/yb_tcmalloc_utils.h +41 -0
  912. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/yb_terminated_queries.h +35 -0
  913. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/yb_ysql_conn_mgr_helper.h +154 -0
  914. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/ybctid.h +55 -0
  915. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/ybgate/ybgate_api-test.h +78 -0
  916. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/ybgate/ybgate_api.h +283 -0
  917. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/ybgate/ybgate_cpp_util.h +78 -0
  918. data/ext/yb_ddl_parser/vendor/yugabyte-postgres/src/include/ybgate/ybgate_status.h +136 -0
  919. data/ext/yb_ddl_parser/yb_ddl_parser_ext.c +1740 -0
  920. data/ext/yb_ddl_parser/yb_parser_stubs.c +459 -0
  921. data/lib/yb_ddl_parser/ast.rb +276 -0
  922. data/lib/yb_ddl_parser/version.rb +6 -0
  923. data/lib/yb_ddl_parser.rb +32 -0
  924. data/test/test_helper.rb +5 -0
  925. data/test/yb_ddl_parser_test.rb +353 -0
  926. metadata +990 -0
@@ -0,0 +1,3955 @@
1
+ /*-------------------------------------------------------------------------
2
+ *
3
+ * parsenodes.h
4
+ * definitions for parse tree nodes
5
+ *
6
+ * Many of the node types used in parsetrees include a "location" field.
7
+ * This is a byte (not character) offset in the original source text, to be
8
+ * used for positioning an error cursor when there is an error related to
9
+ * the node. Access to the original source text is needed to make use of
10
+ * the location. At the topmost (statement) level, we also provide a
11
+ * statement length, likewise measured in bytes, for convenience in
12
+ * identifying statement boundaries in multi-statement source strings.
13
+ *
14
+ *
15
+ * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
16
+ * Portions Copyright (c) 1994, Regents of the University of California
17
+ *
18
+ * src/include/nodes/parsenodes.h
19
+ *
20
+ *-------------------------------------------------------------------------
21
+ */
22
+ #ifndef PARSENODES_H
23
+ #define PARSENODES_H
24
+
25
+ #include "nodes/bitmapset.h"
26
+ #include "nodes/lockoptions.h"
27
+ #include "nodes/primnodes.h"
28
+ #include "nodes/value.h"
29
+ #include "partitioning/partdefs.h"
30
+
31
+
32
+ typedef enum OverridingKind
33
+ {
34
+ OVERRIDING_NOT_SET = 0,
35
+ OVERRIDING_USER_VALUE,
36
+ OVERRIDING_SYSTEM_VALUE
37
+ } OverridingKind;
38
+
39
+ /* Possible sources of a Query */
40
+ typedef enum QuerySource
41
+ {
42
+ QSRC_ORIGINAL, /* original parsetree (explicit query) */
43
+ QSRC_PARSER, /* added by parse analysis (now unused) */
44
+ QSRC_INSTEAD_RULE, /* added by unconditional INSTEAD rule */
45
+ QSRC_QUAL_INSTEAD_RULE, /* added by conditional INSTEAD rule */
46
+ QSRC_NON_INSTEAD_RULE /* added by non-INSTEAD rule */
47
+ } QuerySource;
48
+
49
+ /* Sort ordering options for ORDER BY and CREATE INDEX */
50
+ typedef enum SortByDir
51
+ {
52
+ SORTBY_DEFAULT,
53
+ SORTBY_ASC,
54
+ SORTBY_DESC,
55
+ SORTBY_USING, /* not allowed in CREATE INDEX ... */
56
+ SORTBY_HASH
57
+ } SortByDir;
58
+
59
+ typedef enum SortByNulls
60
+ {
61
+ SORTBY_NULLS_DEFAULT,
62
+ SORTBY_NULLS_FIRST,
63
+ SORTBY_NULLS_LAST
64
+ } SortByNulls;
65
+
66
+ /* Options for [ ALL | DISTINCT ] */
67
+ typedef enum SetQuantifier
68
+ {
69
+ SET_QUANTIFIER_DEFAULT,
70
+ SET_QUANTIFIER_ALL,
71
+ SET_QUANTIFIER_DISTINCT
72
+ } SetQuantifier;
73
+
74
+ /*
75
+ * Grantable rights are encoded so that we can OR them together in a bitmask.
76
+ * The present representation of AclItem limits us to 16 distinct rights,
77
+ * even though AclMode is defined as uint32. See utils/acl.h.
78
+ *
79
+ * Caution: changing these codes breaks stored ACLs, hence forces initdb.
80
+ */
81
+ typedef uint32 AclMode; /* a bitmask of privilege bits */
82
+
83
+ #define ACL_INSERT (1<<0) /* for relations */
84
+ #define ACL_SELECT (1<<1)
85
+ #define ACL_UPDATE (1<<2)
86
+ #define ACL_DELETE (1<<3)
87
+ #define ACL_TRUNCATE (1<<4)
88
+ #define ACL_REFERENCES (1<<5)
89
+ #define ACL_TRIGGER (1<<6)
90
+ #define ACL_EXECUTE (1<<7) /* for functions */
91
+ #define ACL_USAGE (1<<8) /* for languages, namespaces, FDWs, and
92
+ * servers */
93
+ #define ACL_CREATE (1<<9) /* for namespaces and databases */
94
+ #define ACL_CREATE_TEMP (1<<10) /* for databases */
95
+ #define ACL_CONNECT (1<<11) /* for databases */
96
+ #define ACL_SET (1<<12) /* for configuration parameters */
97
+ #define ACL_ALTER_SYSTEM (1<<13) /* for configuration parameters */
98
+ #define N_ACL_RIGHTS 14 /* 1 plus the last 1<<x */
99
+ #define ACL_NO_RIGHTS 0
100
+ /* Currently, SELECT ... FOR [KEY] UPDATE/SHARE requires UPDATE privileges */
101
+ #define ACL_SELECT_FOR_UPDATE ACL_UPDATE
102
+
103
+
104
+ /*****************************************************************************
105
+ * Query Tree
106
+ *****************************************************************************/
107
+
108
+ /*
109
+ * Query -
110
+ * Parse analysis turns all statements into a Query tree
111
+ * for further processing by the rewriter and planner.
112
+ *
113
+ * Utility statements (i.e. non-optimizable statements) have the
114
+ * utilityStmt field set, and the rest of the Query is mostly dummy.
115
+ *
116
+ * Planning converts a Query tree into a Plan tree headed by a PlannedStmt
117
+ * node --- the Query structure is not used by the executor.
118
+ */
119
+ typedef struct Query
120
+ {
121
+ NodeTag type;
122
+
123
+ CmdType commandType; /* select|insert|update|delete|merge|utility */
124
+
125
+ QuerySource querySource; /* where did I come from? */
126
+
127
+ uint64 queryId; /* query identifier (can be set by plugins) */
128
+
129
+ bool canSetTag; /* do I set the command result tag? */
130
+
131
+ Node *utilityStmt; /* non-null if commandType == CMD_UTILITY */
132
+
133
+ int resultRelation; /* rtable index of target relation for
134
+ * INSERT/UPDATE/DELETE/MERGE; 0 for SELECT */
135
+
136
+ bool hasAggs; /* has aggregates in tlist or havingQual */
137
+ bool hasWindowFuncs; /* has window functions in tlist */
138
+ bool hasTargetSRFs; /* has set-returning functions in tlist */
139
+ bool hasSubLinks; /* has subquery SubLink */
140
+ bool hasDistinctOn; /* distinctClause is from DISTINCT ON */
141
+ bool hasRecursive; /* WITH RECURSIVE was specified */
142
+ bool hasModifyingCTE; /* has INSERT/UPDATE/DELETE in WITH */
143
+ bool hasForUpdate; /* FOR [KEY] UPDATE/SHARE was specified */
144
+ bool hasRowSecurity; /* rewriter has applied some RLS policy */
145
+
146
+ bool isReturn; /* is a RETURN statement */
147
+
148
+ List *cteList; /* WITH list (of CommonTableExpr's) */
149
+
150
+ List *rtable; /* list of range table entries */
151
+ FromExpr *jointree; /* table join tree (FROM and WHERE clauses);
152
+ * also USING clause for MERGE */
153
+
154
+ List *mergeActionList; /* list of actions for MERGE (only) */
155
+ bool mergeUseOuterJoin; /* whether to use outer join */
156
+
157
+ List *targetList; /* target list (of TargetEntry) */
158
+
159
+ OverridingKind override; /* OVERRIDING clause */
160
+
161
+ OnConflictExpr *onConflict; /* ON CONFLICT DO [NOTHING | UPDATE] */
162
+
163
+ List *returningList; /* return-values list (of TargetEntry) */
164
+
165
+ List *groupClause; /* a list of SortGroupClause's */
166
+ bool groupDistinct; /* is the group by clause distinct? */
167
+
168
+ List *groupingSets; /* a list of GroupingSet's if present */
169
+
170
+ Node *havingQual; /* qualifications applied to groups */
171
+
172
+ List *windowClause; /* a list of WindowClause's */
173
+
174
+ List *distinctClause; /* a list of SortGroupClause's */
175
+
176
+ List *sortClause; /* a list of SortGroupClause's */
177
+
178
+ Node *limitOffset; /* # of result tuples to skip (int8 expr) */
179
+ Node *limitCount; /* # of result tuples to return (int8 expr) */
180
+ LimitOption limitOption; /* limit type */
181
+
182
+ List *rowMarks; /* a list of RowMarkClause's */
183
+
184
+ Node *setOperations; /* set-operation tree if this is top level of
185
+ * a UNION/INTERSECT/EXCEPT query */
186
+
187
+ List *constraintDeps; /* a list of pg_constraint OIDs that the query
188
+ * depends on to be semantically valid */
189
+
190
+ List *withCheckOptions; /* a list of WithCheckOption's (added
191
+ * during rewrite) */
192
+
193
+ /*
194
+ * The following two fields identify the portion of the source text string
195
+ * containing this query. They are typically only populated in top-level
196
+ * Queries, not in sub-queries. When not set, they might both be zero, or
197
+ * both be -1 meaning "unknown".
198
+ */
199
+ int stmt_location; /* start location, or -1 if unknown */
200
+ int stmt_len; /* length in bytes; 0 means "rest of string" */
201
+ } Query;
202
+
203
+
204
+ /****************************************************************************
205
+ * Supporting data structures for Parse Trees
206
+ *
207
+ * Most of these node types appear in raw parsetrees output by the grammar,
208
+ * and get transformed to something else by the analyzer. A few of them
209
+ * are used as-is in transformed querytrees.
210
+ ****************************************************************************/
211
+
212
+ /*
213
+ * TypeName - specifies a type in definitions
214
+ *
215
+ * For TypeName structures generated internally, it is often easier to
216
+ * specify the type by OID than by name. If "names" is NIL then the
217
+ * actual type OID is given by typeOid, otherwise typeOid is unused.
218
+ * Similarly, if "typmods" is NIL then the actual typmod is expected to
219
+ * be prespecified in typemod, otherwise typemod is unused.
220
+ *
221
+ * If pct_type is true, then names is actually a field name and we look up
222
+ * the type of that field. Otherwise (the normal case), names is a type
223
+ * name possibly qualified with schema and database name.
224
+ */
225
+ typedef struct TypeName
226
+ {
227
+ NodeTag type;
228
+ List *names; /* qualified name (list of String nodes) */
229
+ Oid typeOid; /* type identified by OID */
230
+ bool setof; /* is a set? */
231
+ bool pct_type; /* %TYPE specified? */
232
+ List *typmods; /* type modifier expression(s) */
233
+ int32 typemod; /* prespecified type modifier */
234
+ List *arrayBounds; /* array bounds */
235
+ int location; /* token location, or -1 if unknown */
236
+ } TypeName;
237
+
238
+ /*
239
+ * ColumnRef - specifies a reference to a column, or possibly a whole tuple
240
+ *
241
+ * The "fields" list must be nonempty. It can contain String nodes
242
+ * (representing names) and A_Star nodes (representing occurrence of a '*').
243
+ * Currently, A_Star must appear only as the last list element --- the grammar
244
+ * is responsible for enforcing this!
245
+ *
246
+ * Note: any container subscripting or selection of fields from composite columns
247
+ * is represented by an A_Indirection node above the ColumnRef. However,
248
+ * for simplicity in the normal case, initial field selection from a table
249
+ * name is represented within ColumnRef and not by adding A_Indirection.
250
+ */
251
+ typedef struct ColumnRef
252
+ {
253
+ NodeTag type;
254
+ List *fields; /* field names (String nodes) or A_Star */
255
+ int location; /* token location, or -1 if unknown */
256
+ } ColumnRef;
257
+
258
+ /*
259
+ * ParamRef - specifies a $n parameter reference
260
+ */
261
+ typedef struct ParamRef
262
+ {
263
+ NodeTag type;
264
+ int number; /* the number of the parameter */
265
+ int location; /* token location, or -1 if unknown */
266
+ } ParamRef;
267
+
268
+ /*
269
+ * A_Expr - infix, prefix, and postfix expressions
270
+ */
271
+ typedef enum A_Expr_Kind
272
+ {
273
+ AEXPR_OP, /* normal operator */
274
+ AEXPR_OP_ANY, /* scalar op ANY (array) */
275
+ AEXPR_OP_ALL, /* scalar op ALL (array) */
276
+ AEXPR_DISTINCT, /* IS DISTINCT FROM - name must be "=" */
277
+ AEXPR_NOT_DISTINCT, /* IS NOT DISTINCT FROM - name must be "=" */
278
+ AEXPR_NULLIF, /* NULLIF - name must be "=" */
279
+ AEXPR_IN, /* [NOT] IN - name must be "=" or "<>" */
280
+ AEXPR_LIKE, /* [NOT] LIKE - name must be "~~" or "!~~" */
281
+ AEXPR_ILIKE, /* [NOT] ILIKE - name must be "~~*" or "!~~*" */
282
+ AEXPR_SIMILAR, /* [NOT] SIMILAR - name must be "~" or "!~" */
283
+ AEXPR_BETWEEN, /* name must be "BETWEEN" */
284
+ AEXPR_NOT_BETWEEN, /* name must be "NOT BETWEEN" */
285
+ AEXPR_BETWEEN_SYM, /* name must be "BETWEEN SYMMETRIC" */
286
+ AEXPR_NOT_BETWEEN_SYM /* name must be "NOT BETWEEN SYMMETRIC" */
287
+ } A_Expr_Kind;
288
+
289
+ typedef struct A_Expr
290
+ {
291
+ NodeTag type;
292
+ A_Expr_Kind kind; /* see above */
293
+ List *name; /* possibly-qualified name of operator */
294
+ Node *lexpr; /* left argument, or NULL if none */
295
+ Node *rexpr; /* right argument, or NULL if none */
296
+ int location; /* token location, or -1 if unknown */
297
+ } A_Expr;
298
+
299
+ /*
300
+ * A_Const - a literal constant
301
+ */
302
+ typedef struct A_Const
303
+ {
304
+ NodeTag type;
305
+
306
+ /*
307
+ * Value nodes are inline for performance. You can treat 'val' as a node,
308
+ * as in IsA(&val, Integer). 'val' is not valid if isnull is true.
309
+ */
310
+ union ValUnion
311
+ {
312
+ Node node;
313
+ Integer ival;
314
+ Float fval;
315
+ Boolean boolval;
316
+ String sval;
317
+ BitString bsval;
318
+ } val;
319
+ bool isnull; /* SQL NULL constant */
320
+ int location; /* token location, or -1 if unknown */
321
+ } A_Const;
322
+
323
+ /*
324
+ * TypeCast - a CAST expression
325
+ */
326
+ typedef struct TypeCast
327
+ {
328
+ NodeTag type;
329
+ Node *arg; /* the expression being casted */
330
+ TypeName *typeName; /* the target type */
331
+ int location; /* token location, or -1 if unknown */
332
+ } TypeCast;
333
+
334
+ /*
335
+ * CollateClause - a COLLATE expression
336
+ */
337
+ typedef struct CollateClause
338
+ {
339
+ NodeTag type;
340
+ Node *arg; /* input expression */
341
+ List *collname; /* possibly-qualified collation name */
342
+ int location; /* token location, or -1 if unknown */
343
+ } CollateClause;
344
+
345
+ /*
346
+ * RoleSpec - a role name or one of a few special values.
347
+ */
348
+ typedef enum RoleSpecType
349
+ {
350
+ ROLESPEC_CSTRING, /* role name is stored as a C string */
351
+ ROLESPEC_CURRENT_ROLE, /* role spec is CURRENT_ROLE */
352
+ ROLESPEC_CURRENT_USER, /* role spec is CURRENT_USER */
353
+ ROLESPEC_SESSION_USER, /* role spec is SESSION_USER */
354
+ ROLESPEC_PUBLIC /* role name is "public" */
355
+ } RoleSpecType;
356
+
357
+ typedef struct RoleSpec
358
+ {
359
+ NodeTag type;
360
+ RoleSpecType roletype; /* Type of this rolespec */
361
+ char *rolename; /* filled only for ROLESPEC_CSTRING */
362
+ int location; /* token location, or -1 if unknown */
363
+ } RoleSpec;
364
+
365
+ /*
366
+ * FuncCall - a function or aggregate invocation
367
+ *
368
+ * agg_order (if not NIL) indicates we saw 'foo(... ORDER BY ...)', or if
369
+ * agg_within_group is true, it was 'foo(...) WITHIN GROUP (ORDER BY ...)'.
370
+ * agg_star indicates we saw a 'foo(*)' construct, while agg_distinct
371
+ * indicates we saw 'foo(DISTINCT ...)'. In any of these cases, the
372
+ * construct *must* be an aggregate call. Otherwise, it might be either an
373
+ * aggregate or some other kind of function. However, if FILTER or OVER is
374
+ * present it had better be an aggregate or window function.
375
+ *
376
+ * Normally, you'd initialize this via makeFuncCall() and then only change the
377
+ * parts of the struct its defaults don't match afterwards, as needed.
378
+ */
379
+ typedef struct FuncCall
380
+ {
381
+ NodeTag type;
382
+ List *funcname; /* qualified name of function */
383
+ List *args; /* the arguments (list of exprs) */
384
+ List *agg_order; /* ORDER BY (list of SortBy) */
385
+ Node *agg_filter; /* FILTER clause, if any */
386
+ struct WindowDef *over; /* OVER clause, if any */
387
+ bool agg_within_group; /* ORDER BY appeared in WITHIN GROUP */
388
+ bool agg_star; /* argument was really '*' */
389
+ bool agg_distinct; /* arguments were labeled DISTINCT */
390
+ bool func_variadic; /* last argument was labeled VARIADIC */
391
+ CoercionForm funcformat; /* how to display this node */
392
+ int location; /* token location, or -1 if unknown */
393
+ } FuncCall;
394
+
395
+ /*
396
+ * A_Star - '*' representing all columns of a table or compound field
397
+ *
398
+ * This can appear within ColumnRef.fields, A_Indirection.indirection, and
399
+ * ResTarget.indirection lists.
400
+ */
401
+ typedef struct A_Star
402
+ {
403
+ NodeTag type;
404
+ } A_Star;
405
+
406
+ /*
407
+ * A_Indices - array subscript or slice bounds ([idx] or [lidx:uidx])
408
+ *
409
+ * In slice case, either or both of lidx and uidx can be NULL (omitted).
410
+ * In non-slice case, uidx holds the single subscript and lidx is always NULL.
411
+ */
412
+ typedef struct A_Indices
413
+ {
414
+ NodeTag type;
415
+ bool is_slice; /* true if slice (i.e., colon present) */
416
+ Node *lidx; /* slice lower bound, if any */
417
+ Node *uidx; /* subscript, or slice upper bound if any */
418
+ } A_Indices;
419
+
420
+ /*
421
+ * A_Indirection - select a field and/or array element from an expression
422
+ *
423
+ * The indirection list can contain A_Indices nodes (representing
424
+ * subscripting), String nodes (representing field selection --- the
425
+ * string value is the name of the field to select), and A_Star nodes
426
+ * (representing selection of all fields of a composite type).
427
+ * For example, a complex selection operation like
428
+ * (foo).field1[42][7].field2
429
+ * would be represented with a single A_Indirection node having a 4-element
430
+ * indirection list.
431
+ *
432
+ * Currently, A_Star must appear only as the last list element --- the grammar
433
+ * is responsible for enforcing this!
434
+ */
435
+ typedef struct A_Indirection
436
+ {
437
+ NodeTag type;
438
+ Node *arg; /* the thing being selected from */
439
+ List *indirection; /* subscripts and/or field names and/or * */
440
+ } A_Indirection;
441
+
442
+ /*
443
+ * A_ArrayExpr - an ARRAY[] construct
444
+ */
445
+ typedef struct A_ArrayExpr
446
+ {
447
+ NodeTag type;
448
+ List *elements; /* array element expressions */
449
+ int location; /* token location, or -1 if unknown */
450
+ } A_ArrayExpr;
451
+
452
+ /*
453
+ * ResTarget -
454
+ * result target (used in target list of pre-transformed parse trees)
455
+ *
456
+ * In a SELECT target list, 'name' is the column label from an
457
+ * 'AS ColumnLabel' clause, or NULL if there was none, and 'val' is the
458
+ * value expression itself. The 'indirection' field is not used.
459
+ *
460
+ * INSERT uses ResTarget in its target-column-names list. Here, 'name' is
461
+ * the name of the destination column, 'indirection' stores any subscripts
462
+ * attached to the destination, and 'val' is not used.
463
+ *
464
+ * In an UPDATE target list, 'name' is the name of the destination column,
465
+ * 'indirection' stores any subscripts attached to the destination, and
466
+ * 'val' is the expression to assign.
467
+ *
468
+ * See A_Indirection for more info about what can appear in 'indirection'.
469
+ */
470
+ typedef struct ResTarget
471
+ {
472
+ NodeTag type;
473
+ char *name; /* column name or NULL */
474
+ List *indirection; /* subscripts, field names, and '*', or NIL */
475
+ Node *val; /* the value expression to compute or assign */
476
+ int location; /* token location, or -1 if unknown */
477
+ } ResTarget;
478
+
479
+ /*
480
+ * MultiAssignRef - element of a row source expression for UPDATE
481
+ *
482
+ * In an UPDATE target list, when we have SET (a,b,c) = row-valued-expression,
483
+ * we generate separate ResTarget items for each of a,b,c. Their "val" trees
484
+ * are MultiAssignRef nodes numbered 1..n, linking to a common copy of the
485
+ * row-valued-expression (which parse analysis will process only once, when
486
+ * handling the MultiAssignRef with colno=1).
487
+ */
488
+ typedef struct MultiAssignRef
489
+ {
490
+ NodeTag type;
491
+ Node *source; /* the row-valued expression */
492
+ int colno; /* column number for this target (1..n) */
493
+ int ncolumns; /* number of targets in the construct */
494
+ } MultiAssignRef;
495
+
496
+ /*
497
+ * SortBy - for ORDER BY clause
498
+ */
499
+ typedef struct SortBy
500
+ {
501
+ NodeTag type;
502
+ Node *node; /* expression to sort on */
503
+ SortByDir sortby_dir; /* ASC/DESC/USING/default */
504
+ SortByNulls sortby_nulls; /* NULLS FIRST/LAST */
505
+ List *useOp; /* name of op to use, if SORTBY_USING */
506
+ int location; /* operator location, or -1 if none/unknown */
507
+ } SortBy;
508
+
509
+ /*
510
+ * WindowDef - raw representation of WINDOW and OVER clauses
511
+ *
512
+ * For entries in a WINDOW list, "name" is the window name being defined.
513
+ * For OVER clauses, we use "name" for the "OVER window" syntax, or "refname"
514
+ * for the "OVER (window)" syntax, which is subtly different --- the latter
515
+ * implies overriding the window frame clause.
516
+ */
517
+ typedef struct WindowDef
518
+ {
519
+ NodeTag type;
520
+ char *name; /* window's own name */
521
+ char *refname; /* referenced window name, if any */
522
+ List *partitionClause; /* PARTITION BY expression list */
523
+ List *orderClause; /* ORDER BY (list of SortBy) */
524
+ int frameOptions; /* frame_clause options, see below */
525
+ Node *startOffset; /* expression for starting bound, if any */
526
+ Node *endOffset; /* expression for ending bound, if any */
527
+ int location; /* parse location, or -1 if none/unknown */
528
+ } WindowDef;
529
+
530
+ /*
531
+ * frameOptions is an OR of these bits. The NONDEFAULT and BETWEEN bits are
532
+ * used so that ruleutils.c can tell which properties were specified and
533
+ * which were defaulted; the correct behavioral bits must be set either way.
534
+ * The START_foo and END_foo options must come in pairs of adjacent bits for
535
+ * the convenience of gram.y, even though some of them are useless/invalid.
536
+ */
537
+ #define FRAMEOPTION_NONDEFAULT 0x00001 /* any specified? */
538
+ #define FRAMEOPTION_RANGE 0x00002 /* RANGE behavior */
539
+ #define FRAMEOPTION_ROWS 0x00004 /* ROWS behavior */
540
+ #define FRAMEOPTION_GROUPS 0x00008 /* GROUPS behavior */
541
+ #define FRAMEOPTION_BETWEEN 0x00010 /* BETWEEN given? */
542
+ #define FRAMEOPTION_START_UNBOUNDED_PRECEDING 0x00020 /* start is U. P. */
543
+ #define FRAMEOPTION_END_UNBOUNDED_PRECEDING 0x00040 /* (disallowed) */
544
+ #define FRAMEOPTION_START_UNBOUNDED_FOLLOWING 0x00080 /* (disallowed) */
545
+ #define FRAMEOPTION_END_UNBOUNDED_FOLLOWING 0x00100 /* end is U. F. */
546
+ #define FRAMEOPTION_START_CURRENT_ROW 0x00200 /* start is C. R. */
547
+ #define FRAMEOPTION_END_CURRENT_ROW 0x00400 /* end is C. R. */
548
+ #define FRAMEOPTION_START_OFFSET_PRECEDING 0x00800 /* start is O. P. */
549
+ #define FRAMEOPTION_END_OFFSET_PRECEDING 0x01000 /* end is O. P. */
550
+ #define FRAMEOPTION_START_OFFSET_FOLLOWING 0x02000 /* start is O. F. */
551
+ #define FRAMEOPTION_END_OFFSET_FOLLOWING 0x04000 /* end is O. F. */
552
+ #define FRAMEOPTION_EXCLUDE_CURRENT_ROW 0x08000 /* omit C.R. */
553
+ #define FRAMEOPTION_EXCLUDE_GROUP 0x10000 /* omit C.R. & peers */
554
+ #define FRAMEOPTION_EXCLUDE_TIES 0x20000 /* omit C.R.'s peers */
555
+
556
+ #define FRAMEOPTION_START_OFFSET \
557
+ (FRAMEOPTION_START_OFFSET_PRECEDING | FRAMEOPTION_START_OFFSET_FOLLOWING)
558
+ #define FRAMEOPTION_END_OFFSET \
559
+ (FRAMEOPTION_END_OFFSET_PRECEDING | FRAMEOPTION_END_OFFSET_FOLLOWING)
560
+ #define FRAMEOPTION_EXCLUSION \
561
+ (FRAMEOPTION_EXCLUDE_CURRENT_ROW | FRAMEOPTION_EXCLUDE_GROUP | \
562
+ FRAMEOPTION_EXCLUDE_TIES)
563
+
564
+ #define FRAMEOPTION_DEFAULTS \
565
+ (FRAMEOPTION_RANGE | FRAMEOPTION_START_UNBOUNDED_PRECEDING | \
566
+ FRAMEOPTION_END_CURRENT_ROW)
567
+
568
+ /*
569
+ * RangeSubselect - subquery appearing in a FROM clause
570
+ */
571
+ typedef struct RangeSubselect
572
+ {
573
+ NodeTag type;
574
+ bool lateral; /* does it have LATERAL prefix? */
575
+ Node *subquery; /* the untransformed sub-select clause */
576
+ Alias *alias; /* table alias & optional column aliases */
577
+ } RangeSubselect;
578
+
579
+ /*
580
+ * RangeFunction - function call appearing in a FROM clause
581
+ *
582
+ * functions is a List because we use this to represent the construct
583
+ * ROWS FROM(func1(...), func2(...), ...). Each element of this list is a
584
+ * two-element sublist, the first element being the untransformed function
585
+ * call tree, and the second element being a possibly-empty list of ColumnDef
586
+ * nodes representing any columndef list attached to that function within the
587
+ * ROWS FROM() syntax.
588
+ *
589
+ * alias and coldeflist represent any alias and/or columndef list attached
590
+ * at the top level. (We disallow coldeflist appearing both here and
591
+ * per-function, but that's checked in parse analysis, not by the grammar.)
592
+ */
593
+ typedef struct RangeFunction
594
+ {
595
+ NodeTag type;
596
+ bool lateral; /* does it have LATERAL prefix? */
597
+ bool ordinality; /* does it have WITH ORDINALITY suffix? */
598
+ bool is_rowsfrom; /* is result of ROWS FROM() syntax? */
599
+ List *functions; /* per-function information, see above */
600
+ Alias *alias; /* table alias & optional column aliases */
601
+ List *coldeflist; /* list of ColumnDef nodes to describe result
602
+ * of function returning RECORD */
603
+ } RangeFunction;
604
+
605
+ /*
606
+ * RangeTableFunc - raw form of "table functions" such as XMLTABLE
607
+ */
608
+ typedef struct RangeTableFunc
609
+ {
610
+ NodeTag type;
611
+ bool lateral; /* does it have LATERAL prefix? */
612
+ Node *docexpr; /* document expression */
613
+ Node *rowexpr; /* row generator expression */
614
+ List *namespaces; /* list of namespaces as ResTarget */
615
+ List *columns; /* list of RangeTableFuncCol */
616
+ Alias *alias; /* table alias & optional column aliases */
617
+ int location; /* token location, or -1 if unknown */
618
+ } RangeTableFunc;
619
+
620
+ /*
621
+ * RangeTableFuncCol - one column in a RangeTableFunc->columns
622
+ *
623
+ * If for_ordinality is true (FOR ORDINALITY), then the column is an int4
624
+ * column and the rest of the fields are ignored.
625
+ */
626
+ typedef struct RangeTableFuncCol
627
+ {
628
+ NodeTag type;
629
+ char *colname; /* name of generated column */
630
+ TypeName *typeName; /* type of generated column */
631
+ bool for_ordinality; /* does it have FOR ORDINALITY? */
632
+ bool is_not_null; /* does it have NOT NULL? */
633
+ Node *colexpr; /* column filter expression */
634
+ Node *coldefexpr; /* column default value expression */
635
+ int location; /* token location, or -1 if unknown */
636
+ } RangeTableFuncCol;
637
+
638
+ /*
639
+ * RangeTableSample - TABLESAMPLE appearing in a raw FROM clause
640
+ *
641
+ * This node, appearing only in raw parse trees, represents
642
+ * <relation> TABLESAMPLE <method> (<params>) REPEATABLE (<num>)
643
+ * Currently, the <relation> can only be a RangeVar, but we might in future
644
+ * allow RangeSubselect and other options. Note that the RangeTableSample
645
+ * is wrapped around the node representing the <relation>, rather than being
646
+ * a subfield of it.
647
+ */
648
+ typedef struct RangeTableSample
649
+ {
650
+ NodeTag type;
651
+ Node *relation; /* relation to be sampled */
652
+ List *method; /* sampling method name (possibly qualified) */
653
+ List *args; /* argument(s) for sampling method */
654
+ Node *repeatable; /* REPEATABLE expression, or NULL if none */
655
+ int location; /* method name location, or -1 if unknown */
656
+ } RangeTableSample;
657
+
658
+ /*
659
+ * ColumnDef - column definition (used in various creates)
660
+ *
661
+ * If the column has a default value, we may have the value expression
662
+ * in either "raw" form (an untransformed parse tree) or "cooked" form
663
+ * (a post-parse-analysis, executable expression tree), depending on
664
+ * how this ColumnDef node was created (by parsing, or by inheritance
665
+ * from an existing relation). We should never have both in the same node!
666
+ *
667
+ * Similarly, we may have a COLLATE specification in either raw form
668
+ * (represented as a CollateClause with arg==NULL) or cooked form
669
+ * (the collation's OID).
670
+ *
671
+ * The constraints list may contain a CONSTR_DEFAULT item in a raw
672
+ * parsetree produced by gram.y, but transformCreateStmt will remove
673
+ * the item and set raw_default instead. CONSTR_DEFAULT items
674
+ * should not appear in any subsequent processing.
675
+ */
676
+ typedef struct ColumnDef
677
+ {
678
+ NodeTag type;
679
+ char *colname; /* name of column */
680
+ TypeName *typeName; /* type of column */
681
+ char *compression; /* compression method for column */
682
+ int inhcount; /* number of times column is inherited */
683
+ bool is_local; /* column has local (non-inherited) def'n */
684
+ bool is_not_null; /* NOT NULL constraint specified? */
685
+ bool is_from_type; /* column definition came from table type */
686
+ char storage; /* attstorage setting, or 0 for default */
687
+ Node *raw_default; /* default value (untransformed parse tree) */
688
+ Node *cooked_default; /* default value (transformed expr tree) */
689
+ char identity; /* attidentity setting */
690
+ RangeVar *identitySequence; /* to store identity sequence name for
691
+ * ALTER TABLE ... ADD COLUMN */
692
+ char generated; /* attgenerated setting */
693
+ CollateClause *collClause; /* untransformed COLLATE spec, if any */
694
+ Oid collOid; /* collation OID (InvalidOid if not set) */
695
+ List *constraints; /* other constraints on column */
696
+ List *fdwoptions; /* per-column FDW options */
697
+ int location; /* parse location, or -1 if none/unknown */
698
+ } ColumnDef;
699
+
700
+ /*
701
+ * TableLikeClause - CREATE TABLE ( ... LIKE ... ) clause
702
+ */
703
+ typedef struct TableLikeClause
704
+ {
705
+ NodeTag type;
706
+ RangeVar *relation;
707
+ bits32 options; /* OR of TableLikeOption flags */
708
+ Oid relationOid; /* If table has been looked up, its OID */
709
+
710
+ /* YB */
711
+ Oid yb_tablespaceOid; /* Yugabyte also needs info on where it is */
712
+ } TableLikeClause;
713
+
714
+ typedef enum TableLikeOption
715
+ {
716
+ CREATE_TABLE_LIKE_COMMENTS = 1 << 0,
717
+ CREATE_TABLE_LIKE_COMPRESSION = 1 << 1,
718
+ CREATE_TABLE_LIKE_CONSTRAINTS = 1 << 2,
719
+ CREATE_TABLE_LIKE_DEFAULTS = 1 << 3,
720
+ CREATE_TABLE_LIKE_GENERATED = 1 << 4,
721
+ CREATE_TABLE_LIKE_IDENTITY = 1 << 5,
722
+ CREATE_TABLE_LIKE_INDEXES = 1 << 6,
723
+ CREATE_TABLE_LIKE_STATISTICS = 1 << 7,
724
+ CREATE_TABLE_LIKE_STORAGE = 1 << 8,
725
+ CREATE_TABLE_LIKE_ALL = PG_INT32_MAX
726
+ } TableLikeOption;
727
+
728
+ /*
729
+ * IndexElem - index parameters (used in CREATE INDEX, and in ON CONFLICT)
730
+ *
731
+ * For a plain index attribute, 'name' is the name of the table column to
732
+ * index, and 'expr' is NULL. For an index expression, 'name' is NULL and
733
+ * 'expr' is the expression tree.
734
+ *
735
+ * When a YugaByte LSM primary key or index declaration contains an attribute
736
+ * group like "create table (... primary key ((h1, h2, ...) hash, ...))",
737
+ * the attribute group is first represented as an IndexElem with 'h1', 'h2',
738
+ * ... in 'yb_yname_list'. The attribute group is then flattened as a list of
739
+ * IndexElem's the relevant the grammar rules.
740
+ *
741
+ * yb_hash_group is -1 for ordinary index elements and non-negative for
742
+ * elements flattened from the same HASH attribute group.
743
+ */
744
+ typedef struct IndexElem
745
+ {
746
+ NodeTag type;
747
+ char *name; /* name of attribute to index, or NULL */
748
+ Node *expr; /* expression to index, or NULL */
749
+ char *indexcolname; /* name for index column; NULL = default */
750
+ List *collation; /* name of collation; NIL = default */
751
+ List *opclass; /* name of desired opclass; NIL = default */
752
+ List *opclassopts; /* opclass-specific options, or NIL */
753
+ SortByDir ordering; /* ASC/DESC/default */
754
+ SortByNulls nulls_ordering; /* FIRST/LAST/default */
755
+ int yb_hash_group; /* YB HASH group id, or -1 */
756
+ } IndexElem;
757
+
758
+ /*
759
+ * DefElem - a generic "name = value" option definition
760
+ *
761
+ * In some contexts the name can be qualified. Also, certain SQL commands
762
+ * allow a SET/ADD/DROP action to be attached to option settings, so it's
763
+ * convenient to carry a field for that too. (Note: currently, it is our
764
+ * practice that the grammar allows namespace and action only in statements
765
+ * where they are relevant; C code can just ignore those fields in other
766
+ * statements.)
767
+ */
768
+ typedef enum DefElemAction
769
+ {
770
+ DEFELEM_UNSPEC, /* no action given */
771
+ DEFELEM_SET,
772
+ DEFELEM_ADD,
773
+ DEFELEM_DROP
774
+ } DefElemAction;
775
+
776
+ typedef struct DefElem
777
+ {
778
+ NodeTag type;
779
+ char *defnamespace; /* NULL if unqualified name */
780
+ char *defname;
781
+ Node *arg; /* typically Integer, Float, String, or
782
+ * TypeName */
783
+ DefElemAction defaction; /* unspecified action, or SET/ADD/DROP */
784
+ int location; /* token location, or -1 if unknown */
785
+ } DefElem;
786
+
787
+ /*
788
+ * LockingClause - raw representation of FOR [NO KEY] UPDATE/[KEY] SHARE
789
+ * options
790
+ *
791
+ * Note: lockedRels == NIL means "all relations in query". Otherwise it
792
+ * is a list of RangeVar nodes. (We use RangeVar mainly because it carries
793
+ * a location field --- currently, parse analysis insists on unqualified
794
+ * names in LockingClause.)
795
+ */
796
+ typedef struct LockingClause
797
+ {
798
+ NodeTag type;
799
+ List *lockedRels; /* FOR [KEY] UPDATE/SHARE relations */
800
+ LockClauseStrength strength;
801
+ LockWaitPolicy waitPolicy; /* NOWAIT and SKIP LOCKED */
802
+ } LockingClause;
803
+
804
+ /*
805
+ * XMLSERIALIZE (in raw parse tree only)
806
+ */
807
+ typedef struct XmlSerialize
808
+ {
809
+ NodeTag type;
810
+ XmlOptionType xmloption; /* DOCUMENT or CONTENT */
811
+ Node *expr;
812
+ TypeName *typeName;
813
+ int location; /* token location, or -1 if unknown */
814
+ } XmlSerialize;
815
+
816
+ /* Partitioning related definitions */
817
+
818
+ /*
819
+ * PartitionElem - parse-time representation of a single partition key
820
+ *
821
+ * expr can be either a raw expression tree or a parse-analyzed expression.
822
+ * We don't store these on-disk, though.
823
+ */
824
+ typedef struct PartitionElem
825
+ {
826
+ NodeTag type;
827
+ char *name; /* name of column to partition on, or NULL */
828
+ Node *expr; /* expression to partition on, or NULL */
829
+ List *collation; /* name of collation; NIL = default */
830
+ List *opclass; /* name of desired opclass; NIL = default */
831
+ int location; /* token location, or -1 if unknown */
832
+ } PartitionElem;
833
+
834
+ /*
835
+ * PartitionSpec - parse-time representation of a partition key specification
836
+ *
837
+ * This represents the key space we will be partitioning on.
838
+ */
839
+ typedef struct PartitionSpec
840
+ {
841
+ NodeTag type;
842
+ char *strategy; /* partitioning strategy ('hash', 'list' or
843
+ * 'range') */
844
+ List *partParams; /* List of PartitionElems */
845
+ int location; /* token location, or -1 if unknown */
846
+ } PartitionSpec;
847
+
848
+ /* Internal codes for partitioning strategies */
849
+ #define PARTITION_STRATEGY_HASH 'h'
850
+ #define PARTITION_STRATEGY_LIST 'l'
851
+ #define PARTITION_STRATEGY_RANGE 'r'
852
+
853
+ /*
854
+ * PartitionBoundSpec - a partition bound specification
855
+ *
856
+ * This represents the portion of the partition key space assigned to a
857
+ * particular partition. These are stored on disk in pg_class.relpartbound.
858
+ */
859
+ struct PartitionBoundSpec
860
+ {
861
+ NodeTag type;
862
+
863
+ char strategy; /* see PARTITION_STRATEGY codes above */
864
+ bool is_default; /* is it a default partition bound? */
865
+
866
+ /* Partitioning info for HASH strategy: */
867
+ int modulus;
868
+ int remainder;
869
+
870
+ /* Partitioning info for LIST strategy: */
871
+ List *listdatums; /* List of Consts (or A_Consts in raw tree) */
872
+
873
+ /* Partitioning info for RANGE strategy: */
874
+ List *lowerdatums; /* List of PartitionRangeDatums */
875
+ List *upperdatums; /* List of PartitionRangeDatums */
876
+
877
+ int location; /* token location, or -1 if unknown */
878
+ };
879
+
880
+ /*
881
+ * PartitionRangeDatum - one of the values in a range partition bound
882
+ *
883
+ * This can be MINVALUE, MAXVALUE or a specific bounded value.
884
+ */
885
+ typedef enum PartitionRangeDatumKind
886
+ {
887
+ PARTITION_RANGE_DATUM_MINVALUE = -1, /* less than any other value */
888
+ PARTITION_RANGE_DATUM_VALUE = 0, /* a specific (bounded) value */
889
+ PARTITION_RANGE_DATUM_MAXVALUE = 1 /* greater than any other value */
890
+ } PartitionRangeDatumKind;
891
+
892
+ typedef struct PartitionRangeDatum
893
+ {
894
+ NodeTag type;
895
+
896
+ PartitionRangeDatumKind kind;
897
+ Node *value; /* Const (or A_Const in raw tree), if kind is
898
+ * PARTITION_RANGE_DATUM_VALUE, else NULL */
899
+
900
+ int location; /* token location, or -1 if unknown */
901
+ } PartitionRangeDatum;
902
+
903
+ /*
904
+ * PartitionCmd - info for ALTER TABLE/INDEX ATTACH/DETACH PARTITION commands
905
+ */
906
+ typedef struct PartitionCmd
907
+ {
908
+ NodeTag type;
909
+ RangeVar *name; /* name of partition to attach/detach */
910
+ PartitionBoundSpec *bound; /* FOR VALUES, if attaching */
911
+ bool concurrent;
912
+ } PartitionCmd;
913
+
914
+ /****************************************************************************
915
+ * Nodes for a Query tree
916
+ ****************************************************************************/
917
+
918
+ /*--------------------
919
+ * RangeTblEntry -
920
+ * A range table is a List of RangeTblEntry nodes.
921
+ *
922
+ * A range table entry may represent a plain relation, a sub-select in
923
+ * FROM, or the result of a JOIN clause. (Only explicit JOIN syntax
924
+ * produces an RTE, not the implicit join resulting from multiple FROM
925
+ * items. This is because we only need the RTE to deal with SQL features
926
+ * like outer joins and join-output-column aliasing.) Other special
927
+ * RTE types also exist, as indicated by RTEKind.
928
+ *
929
+ * Note that we consider RTE_RELATION to cover anything that has a pg_class
930
+ * entry. relkind distinguishes the sub-cases.
931
+ *
932
+ * alias is an Alias node representing the AS alias-clause attached to the
933
+ * FROM expression, or NULL if no clause.
934
+ *
935
+ * eref is the table reference name and column reference names (either
936
+ * real or aliases). Note that system columns (OID etc) are not included
937
+ * in the column list.
938
+ * eref->aliasname is required to be present, and should generally be used
939
+ * to identify the RTE for error messages etc.
940
+ *
941
+ * In RELATION RTEs, the colnames in both alias and eref are indexed by
942
+ * physical attribute number; this means there must be colname entries for
943
+ * dropped columns. When building an RTE we insert empty strings ("") for
944
+ * dropped columns. Note however that a stored rule may have nonempty
945
+ * colnames for columns dropped since the rule was created (and for that
946
+ * matter the colnames might be out of date due to column renamings).
947
+ * The same comments apply to FUNCTION RTEs when a function's return type
948
+ * is a named composite type.
949
+ *
950
+ * In JOIN RTEs, the colnames in both alias and eref are one-to-one with
951
+ * joinaliasvars entries. A JOIN RTE will omit columns of its inputs when
952
+ * those columns are known to be dropped at parse time. Again, however,
953
+ * a stored rule might contain entries for columns dropped since the rule
954
+ * was created. (This is only possible for columns not actually referenced
955
+ * in the rule.) When loading a stored rule, we replace the joinaliasvars
956
+ * items for any such columns with null pointers. (We can't simply delete
957
+ * them from the joinaliasvars list, because that would affect the attnums
958
+ * of Vars referencing the rest of the list.)
959
+ *
960
+ * inh is true for relation references that should be expanded to include
961
+ * inheritance children, if the rel has any. This *must* be false for
962
+ * RTEs other than RTE_RELATION entries.
963
+ *
964
+ * inFromCl marks those range variables that are listed in the FROM clause.
965
+ * It's false for RTEs that are added to a query behind the scenes, such
966
+ * as the NEW and OLD variables for a rule, or the subqueries of a UNION.
967
+ * This flag is not used during parsing (except in transformLockingClause,
968
+ * q.v.); the parser now uses a separate "namespace" data structure to
969
+ * control visibility. But it is needed by ruleutils.c to determine
970
+ * whether RTEs should be shown in decompiled queries.
971
+ *
972
+ * requiredPerms and checkAsUser specify run-time access permissions
973
+ * checks to be performed at query startup. The user must have *all*
974
+ * of the permissions that are OR'd together in requiredPerms (zero
975
+ * indicates no permissions checking). If checkAsUser is not zero,
976
+ * then do the permissions checks using the access rights of that user,
977
+ * not the current effective user ID. (This allows rules to act as
978
+ * setuid gateways.) Permissions checks only apply to RELATION RTEs.
979
+ *
980
+ * For SELECT/INSERT/UPDATE permissions, if the user doesn't have
981
+ * table-wide permissions then it is sufficient to have the permissions
982
+ * on all columns identified in selectedCols (for SELECT) and/or
983
+ * insertedCols and/or updatedCols (INSERT with ON CONFLICT DO UPDATE may
984
+ * have all 3). selectedCols, insertedCols and updatedCols are bitmapsets,
985
+ * which cannot have negative integer members, so we subtract
986
+ * FirstLowInvalidHeapAttributeNumber from column numbers before storing
987
+ * them in these fields. A whole-row Var reference is represented by
988
+ * setting the bit for InvalidAttrNumber.
989
+ *
990
+ * updatedCols is also used in some other places, for example, to determine
991
+ * which triggers to fire and in FDWs to know which changed columns they
992
+ * need to ship off.
993
+ *
994
+ * extraUpdatedCols is no longer used or maintained; it's always empty.
995
+ *
996
+ * securityQuals is a list of security barrier quals (boolean expressions),
997
+ * to be tested in the listed order before returning a row from the
998
+ * relation. It is always NIL in parser output. Entries are added by the
999
+ * rewriter to implement security-barrier views and/or row-level security.
1000
+ * Note that the planner turns each boolean expression into an implicitly
1001
+ * AND'ed sublist, as is its usual habit with qualification expressions.
1002
+ *--------------------
1003
+ */
1004
+ typedef enum RTEKind
1005
+ {
1006
+ RTE_RELATION, /* ordinary relation reference */
1007
+ RTE_SUBQUERY, /* subquery in FROM */
1008
+ RTE_JOIN, /* join */
1009
+ RTE_FUNCTION, /* function in FROM */
1010
+ RTE_TABLEFUNC, /* TableFunc(.., column list) */
1011
+ RTE_VALUES, /* VALUES (<exprlist>), (<exprlist>), ... */
1012
+ RTE_CTE, /* common table expr (WITH list element) */
1013
+ RTE_NAMEDTUPLESTORE, /* tuplestore, e.g. for AFTER triggers */
1014
+ RTE_RESULT /* RTE represents an empty FROM clause; such
1015
+ * RTEs are added by the planner, they're not
1016
+ * present during parsing or rewriting */
1017
+ } RTEKind;
1018
+
1019
+ typedef struct RangeTblEntry
1020
+ {
1021
+ NodeTag type;
1022
+
1023
+ RTEKind rtekind; /* see above */
1024
+
1025
+ /*
1026
+ * XXX the fields applicable to only some rte kinds should be merged into
1027
+ * a union. I didn't do this yet because the diffs would impact a lot of
1028
+ * code that is being actively worked on. FIXME someday.
1029
+ */
1030
+
1031
+ /*
1032
+ * Fields valid for a plain relation RTE (else zero):
1033
+ *
1034
+ * As a special case, RTE_NAMEDTUPLESTORE can also set relid to indicate
1035
+ * that the tuple format of the tuplestore is the same as the referenced
1036
+ * relation. This allows plans referencing AFTER trigger transition
1037
+ * tables to be invalidated if the underlying table is altered.
1038
+ *
1039
+ * rellockmode is really LOCKMODE, but it's declared int to avoid having
1040
+ * to include lock-related headers here. It must be RowExclusiveLock if
1041
+ * the RTE is an INSERT/UPDATE/DELETE/MERGE target, else RowShareLock if
1042
+ * the RTE is a SELECT FOR UPDATE/FOR SHARE target, else AccessShareLock.
1043
+ *
1044
+ * Note: in some cases, rule expansion may result in RTEs that are marked
1045
+ * with RowExclusiveLock even though they are not the target of the
1046
+ * current query; this happens if a DO ALSO rule simply scans the original
1047
+ * target table. We leave such RTEs with their original lockmode so as to
1048
+ * avoid getting an additional, lesser lock.
1049
+ */
1050
+ Oid relid; /* OID of the relation */
1051
+ char relkind; /* relation kind (see pg_class.relkind) */
1052
+ int rellockmode; /* lock level that query requires on the rel */
1053
+ struct TableSampleClause *tablesample; /* sampling info, or NULL */
1054
+
1055
+ /*
1056
+ * Fields valid for a subquery RTE (else NULL):
1057
+ */
1058
+ Query *subquery; /* the sub-query */
1059
+ bool security_barrier; /* is from security_barrier view? */
1060
+
1061
+ /*
1062
+ * Fields valid for a join RTE (else NULL/zero):
1063
+ *
1064
+ * joinaliasvars is a list of (usually) Vars corresponding to the columns
1065
+ * of the join result. An alias Var referencing column K of the join
1066
+ * result can be replaced by the K'th element of joinaliasvars --- but to
1067
+ * simplify the task of reverse-listing aliases correctly, we do not do
1068
+ * that until planning time. In detail: an element of joinaliasvars can
1069
+ * be a Var of one of the join's input relations, or such a Var with an
1070
+ * implicit coercion to the join's output column type, or a COALESCE
1071
+ * expression containing the two input column Vars (possibly coerced).
1072
+ * Elements beyond the first joinmergedcols entries are always just Vars,
1073
+ * and are never referenced from elsewhere in the query (that is, join
1074
+ * alias Vars are generated only for merged columns). We keep these
1075
+ * entries only because they're needed in expandRTE() and similar code.
1076
+ *
1077
+ * Within a Query loaded from a stored rule, it is possible for non-merged
1078
+ * joinaliasvars items to be null pointers, which are placeholders for
1079
+ * (necessarily unreferenced) columns dropped since the rule was made.
1080
+ * Also, once planning begins, joinaliasvars items can be almost anything,
1081
+ * as a result of subquery-flattening substitutions.
1082
+ *
1083
+ * joinleftcols is an integer list of physical column numbers of the left
1084
+ * join input rel that are included in the join; likewise joinrighttcols
1085
+ * for the right join input rel. (Which rels those are can be determined
1086
+ * from the associated JoinExpr.) If the join is USING/NATURAL, then the
1087
+ * first joinmergedcols entries in each list identify the merged columns.
1088
+ * The merged columns come first in the join output, then remaining
1089
+ * columns of the left input, then remaining columns of the right.
1090
+ *
1091
+ * Note that input columns could have been dropped after creation of a
1092
+ * stored rule, if they are not referenced in the query (in particular,
1093
+ * merged columns could not be dropped); this is not accounted for in
1094
+ * joinleftcols/joinrighttcols.
1095
+ */
1096
+ JoinType jointype; /* type of join */
1097
+ int joinmergedcols; /* number of merged (JOIN USING) columns */
1098
+ List *joinaliasvars; /* list of alias-var expansions */
1099
+ List *joinleftcols; /* left-side input column numbers */
1100
+ List *joinrightcols; /* right-side input column numbers */
1101
+
1102
+ /*
1103
+ * join_using_alias is an alias clause attached directly to JOIN/USING. It
1104
+ * is different from the alias field (below) in that it does not hide the
1105
+ * range variables of the tables being joined.
1106
+ */
1107
+ Alias *join_using_alias;
1108
+
1109
+ /*
1110
+ * Fields valid for a function RTE (else NIL/zero):
1111
+ *
1112
+ * When funcordinality is true, the eref->colnames list includes an alias
1113
+ * for the ordinality column. The ordinality column is otherwise
1114
+ * implicit, and must be accounted for "by hand" in places such as
1115
+ * expandRTE().
1116
+ */
1117
+ List *functions; /* list of RangeTblFunction nodes */
1118
+ bool funcordinality; /* is this called WITH ORDINALITY? */
1119
+
1120
+ /*
1121
+ * Fields valid for a TableFunc RTE (else NULL):
1122
+ */
1123
+ TableFunc *tablefunc;
1124
+
1125
+ /*
1126
+ * Fields valid for a values RTE (else NIL):
1127
+ */
1128
+ List *values_lists; /* list of expression lists */
1129
+
1130
+ /*
1131
+ * Fields valid for a CTE RTE (else NULL/zero):
1132
+ */
1133
+ char *ctename; /* name of the WITH list item */
1134
+ Index ctelevelsup; /* number of query levels up */
1135
+ bool self_reference; /* is this a recursive self-reference? */
1136
+
1137
+ /*
1138
+ * Fields valid for CTE, VALUES, ENR, and TableFunc RTEs (else NIL):
1139
+ *
1140
+ * We need these for CTE RTEs so that the types of self-referential
1141
+ * columns are well-defined. For VALUES RTEs, storing these explicitly
1142
+ * saves having to re-determine the info by scanning the values_lists. For
1143
+ * ENRs, we store the types explicitly here (we could get the information
1144
+ * from the catalogs if 'relid' was supplied, but we'd still need these
1145
+ * for TupleDesc-based ENRs, so we might as well always store the type
1146
+ * info here). For TableFuncs, these fields are redundant with data in
1147
+ * the TableFunc node, but keeping them here allows some code sharing with
1148
+ * the other cases.
1149
+ *
1150
+ * For ENRs only, we have to consider the possibility of dropped columns.
1151
+ * A dropped column is included in these lists, but it will have zeroes in
1152
+ * all three lists (as well as an empty-string entry in eref). Testing
1153
+ * for zero coltype is the standard way to detect a dropped column.
1154
+ */
1155
+ List *coltypes; /* OID list of column type OIDs */
1156
+ List *coltypmods; /* integer list of column typmods */
1157
+ List *colcollations; /* OID list of column collation OIDs */
1158
+
1159
+ /*
1160
+ * Fields valid for ENR RTEs (else NULL/zero):
1161
+ */
1162
+ char *enrname; /* name of ephemeral named relation */
1163
+ Cardinality enrtuples; /* estimated or actual from caller */
1164
+
1165
+ /*
1166
+ * Fields valid in all RTEs:
1167
+ */
1168
+ Alias *alias; /* user-written alias clause, if any */
1169
+ Alias *eref; /* expanded reference names */
1170
+ bool lateral; /* subquery, function, or values is LATERAL? */
1171
+ bool inh; /* inheritance requested? */
1172
+ bool inFromCl; /* present in FROM clause? */
1173
+ AclMode requiredPerms; /* bitmask of required access permissions */
1174
+ Oid checkAsUser; /* if valid, check access as this role */
1175
+ Bitmapset *selectedCols; /* columns needing SELECT permission */
1176
+ Bitmapset *insertedCols; /* columns needing INSERT permission */
1177
+ Bitmapset *updatedCols; /* columns needing UPDATE permission */
1178
+ Bitmapset *extraUpdatedCols; /* generated columns being updated */
1179
+ List *securityQuals; /* security barrier quals to apply, if any */
1180
+
1181
+ /* YB */
1182
+ char *ybHintAlias; /* alias to use for hinting - unique across a
1183
+ * query */
1184
+ /* unique identifer (across all blocks) for a base rel - starting at '1' */
1185
+ uint32 ybUniqueBaseId;
1186
+
1187
+ char *ybScannedObjectName;
1188
+
1189
+ char *ybSchemaName;
1190
+ } RangeTblEntry;
1191
+
1192
+ /*
1193
+ * RangeTblFunction -
1194
+ * RangeTblEntry subsidiary data for one function in a FUNCTION RTE.
1195
+ *
1196
+ * If the function had a column definition list (required for an
1197
+ * otherwise-unspecified RECORD result), funccolnames lists the names given
1198
+ * in the definition list, funccoltypes lists their declared column types,
1199
+ * funccoltypmods lists their typmods, funccolcollations their collations.
1200
+ * Otherwise, those fields are NIL.
1201
+ *
1202
+ * Notice we don't attempt to store info about the results of functions
1203
+ * returning named composite types, because those can change from time to
1204
+ * time. We do however remember how many columns we thought the type had
1205
+ * (including dropped columns!), so that we can successfully ignore any
1206
+ * columns added after the query was parsed.
1207
+ */
1208
+ typedef struct RangeTblFunction
1209
+ {
1210
+ NodeTag type;
1211
+
1212
+ Node *funcexpr; /* expression tree for func call */
1213
+ int funccolcount; /* number of columns it contributes to RTE */
1214
+ /* These fields record the contents of a column definition list, if any: */
1215
+ List *funccolnames; /* column names (list of String) */
1216
+ List *funccoltypes; /* OID list of column type OIDs */
1217
+ List *funccoltypmods; /* integer list of column typmods */
1218
+ List *funccolcollations; /* OID list of column collation OIDs */
1219
+ /* This is set during planning for use by the executor: */
1220
+ Bitmapset *funcparams; /* PARAM_EXEC Param IDs affecting this func */
1221
+ } RangeTblFunction;
1222
+
1223
+ /*
1224
+ * TableSampleClause - TABLESAMPLE appearing in a transformed FROM clause
1225
+ *
1226
+ * Unlike RangeTableSample, this is a subnode of the relevant RangeTblEntry.
1227
+ */
1228
+ typedef struct TableSampleClause
1229
+ {
1230
+ NodeTag type;
1231
+ Oid tsmhandler; /* OID of the tablesample handler function */
1232
+ List *args; /* tablesample argument expression(s) */
1233
+ Expr *repeatable; /* REPEATABLE expression, or NULL if none */
1234
+ } TableSampleClause;
1235
+
1236
+ /*
1237
+ * WithCheckOption -
1238
+ * representation of WITH CHECK OPTION checks to be applied to new tuples
1239
+ * when inserting/updating an auto-updatable view, or RLS WITH CHECK
1240
+ * policies to be applied when inserting/updating a relation with RLS.
1241
+ */
1242
+ typedef enum WCOKind
1243
+ {
1244
+ WCO_VIEW_CHECK, /* WCO on an auto-updatable view */
1245
+ WCO_RLS_INSERT_CHECK, /* RLS INSERT WITH CHECK policy */
1246
+ WCO_RLS_UPDATE_CHECK, /* RLS UPDATE WITH CHECK policy */
1247
+ WCO_RLS_CONFLICT_CHECK, /* RLS ON CONFLICT DO UPDATE USING policy */
1248
+ WCO_RLS_MERGE_UPDATE_CHECK, /* RLS MERGE UPDATE USING policy */
1249
+ WCO_RLS_MERGE_DELETE_CHECK /* RLS MERGE DELETE USING policy */
1250
+ } WCOKind;
1251
+
1252
+ typedef struct WithCheckOption
1253
+ {
1254
+ NodeTag type;
1255
+ WCOKind kind; /* kind of WCO */
1256
+ char *relname; /* name of relation that specified the WCO */
1257
+ char *polname; /* name of RLS policy being checked */
1258
+ Node *qual; /* constraint qual to check */
1259
+ bool cascaded; /* true for a cascaded WCO on a view */
1260
+ } WithCheckOption;
1261
+
1262
+ /*
1263
+ * SortGroupClause -
1264
+ * representation of ORDER BY, GROUP BY, PARTITION BY,
1265
+ * DISTINCT, DISTINCT ON items
1266
+ *
1267
+ * You might think that ORDER BY is only interested in defining ordering,
1268
+ * and GROUP/DISTINCT are only interested in defining equality. However,
1269
+ * one way to implement grouping is to sort and then apply a "uniq"-like
1270
+ * filter. So it's also interesting to keep track of possible sort operators
1271
+ * for GROUP/DISTINCT, and in particular to try to sort for the grouping
1272
+ * in a way that will also yield a requested ORDER BY ordering. So we need
1273
+ * to be able to compare ORDER BY and GROUP/DISTINCT lists, which motivates
1274
+ * the decision to give them the same representation.
1275
+ *
1276
+ * tleSortGroupRef must match ressortgroupref of exactly one entry of the
1277
+ * query's targetlist; that is the expression to be sorted or grouped by.
1278
+ * eqop is the OID of the equality operator.
1279
+ * sortop is the OID of the ordering operator (a "<" or ">" operator),
1280
+ * or InvalidOid if not available.
1281
+ * nulls_first means about what you'd expect. If sortop is InvalidOid
1282
+ * then nulls_first is meaningless and should be set to false.
1283
+ * hashable is true if eqop is hashable (note this condition also depends
1284
+ * on the datatype of the input expression).
1285
+ *
1286
+ * In an ORDER BY item, all fields must be valid. (The eqop isn't essential
1287
+ * here, but it's cheap to get it along with the sortop, and requiring it
1288
+ * to be valid eases comparisons to grouping items.) Note that this isn't
1289
+ * actually enough information to determine an ordering: if the sortop is
1290
+ * collation-sensitive, a collation OID is needed too. We don't store the
1291
+ * collation in SortGroupClause because it's not available at the time the
1292
+ * parser builds the SortGroupClause; instead, consult the exposed collation
1293
+ * of the referenced targetlist expression to find out what it is.
1294
+ *
1295
+ * In a grouping item, eqop must be valid. If the eqop is a btree equality
1296
+ * operator, then sortop should be set to a compatible ordering operator.
1297
+ * We prefer to set eqop/sortop/nulls_first to match any ORDER BY item that
1298
+ * the query presents for the same tlist item. If there is none, we just
1299
+ * use the default ordering op for the datatype.
1300
+ *
1301
+ * If the tlist item's type has a hash opclass but no btree opclass, then
1302
+ * we will set eqop to the hash equality operator, sortop to InvalidOid,
1303
+ * and nulls_first to false. A grouping item of this kind can only be
1304
+ * implemented by hashing, and of course it'll never match an ORDER BY item.
1305
+ *
1306
+ * The hashable flag is provided since we generally have the requisite
1307
+ * information readily available when the SortGroupClause is constructed,
1308
+ * and it's relatively expensive to get it again later. Note there is no
1309
+ * need for a "sortable" flag since OidIsValid(sortop) serves the purpose.
1310
+ *
1311
+ * A query might have both ORDER BY and DISTINCT (or DISTINCT ON) clauses.
1312
+ * In SELECT DISTINCT, the distinctClause list is as long or longer than the
1313
+ * sortClause list, while in SELECT DISTINCT ON it's typically shorter.
1314
+ * The two lists must match up to the end of the shorter one --- the parser
1315
+ * rearranges the distinctClause if necessary to make this true. (This
1316
+ * restriction ensures that only one sort step is needed to both satisfy the
1317
+ * ORDER BY and set up for the Unique step. This is semantically necessary
1318
+ * for DISTINCT ON, and presents no real drawback for DISTINCT.)
1319
+ */
1320
+ typedef struct SortGroupClause
1321
+ {
1322
+ NodeTag type;
1323
+ Index tleSortGroupRef; /* reference into targetlist */
1324
+ Oid eqop; /* the equality operator ('=' op) */
1325
+ Oid sortop; /* the ordering operator ('<' op), or 0 */
1326
+ bool nulls_first; /* do NULLs come before normal values? */
1327
+ bool hashable; /* can eqop be implemented by hashing? */
1328
+ } SortGroupClause;
1329
+
1330
+ /*
1331
+ * GroupingSet -
1332
+ * representation of CUBE, ROLLUP and GROUPING SETS clauses
1333
+ *
1334
+ * In a Query with grouping sets, the groupClause contains a flat list of
1335
+ * SortGroupClause nodes for each distinct expression used. The actual
1336
+ * structure of the GROUP BY clause is given by the groupingSets tree.
1337
+ *
1338
+ * In the raw parser output, GroupingSet nodes (of all types except SIMPLE
1339
+ * which is not used) are potentially mixed in with the expressions in the
1340
+ * groupClause of the SelectStmt. (An expression can't contain a GroupingSet,
1341
+ * but a list may mix GroupingSet and expression nodes.) At this stage, the
1342
+ * content of each node is a list of expressions, some of which may be RowExprs
1343
+ * which represent sublists rather than actual row constructors, and nested
1344
+ * GroupingSet nodes where legal in the grammar. The structure directly
1345
+ * reflects the query syntax.
1346
+ *
1347
+ * In parse analysis, the transformed expressions are used to build the tlist
1348
+ * and groupClause list (of SortGroupClause nodes), and the groupingSets tree
1349
+ * is eventually reduced to a fixed format:
1350
+ *
1351
+ * EMPTY nodes represent (), and obviously have no content
1352
+ *
1353
+ * SIMPLE nodes represent a list of one or more expressions to be treated as an
1354
+ * atom by the enclosing structure; the content is an integer list of
1355
+ * ressortgroupref values (see SortGroupClause)
1356
+ *
1357
+ * CUBE and ROLLUP nodes contain a list of one or more SIMPLE nodes.
1358
+ *
1359
+ * SETS nodes contain a list of EMPTY, SIMPLE, CUBE or ROLLUP nodes, but after
1360
+ * parse analysis they cannot contain more SETS nodes; enough of the syntactic
1361
+ * transforms of the spec have been applied that we no longer have arbitrarily
1362
+ * deep nesting (though we still preserve the use of cube/rollup).
1363
+ *
1364
+ * Note that if the groupingSets tree contains no SIMPLE nodes (only EMPTY
1365
+ * nodes at the leaves), then the groupClause will be empty, but this is still
1366
+ * an aggregation query (similar to using aggs or HAVING without GROUP BY).
1367
+ *
1368
+ * As an example, the following clause:
1369
+ *
1370
+ * GROUP BY GROUPING SETS ((a,b), CUBE(c,(d,e)))
1371
+ *
1372
+ * looks like this after raw parsing:
1373
+ *
1374
+ * SETS( RowExpr(a,b) , CUBE( c, RowExpr(d,e) ) )
1375
+ *
1376
+ * and parse analysis converts it to:
1377
+ *
1378
+ * SETS( SIMPLE(1,2), CUBE( SIMPLE(3), SIMPLE(4,5) ) )
1379
+ */
1380
+ typedef enum GroupingSetKind
1381
+ {
1382
+ GROUPING_SET_EMPTY,
1383
+ GROUPING_SET_SIMPLE,
1384
+ GROUPING_SET_ROLLUP,
1385
+ GROUPING_SET_CUBE,
1386
+ GROUPING_SET_SETS
1387
+ } GroupingSetKind;
1388
+
1389
+ typedef struct GroupingSet
1390
+ {
1391
+ NodeTag type;
1392
+ GroupingSetKind kind;
1393
+ List *content;
1394
+ int location;
1395
+ } GroupingSet;
1396
+
1397
+ /*
1398
+ * WindowClause -
1399
+ * transformed representation of WINDOW and OVER clauses
1400
+ *
1401
+ * A parsed Query's windowClause list contains these structs. "name" is set
1402
+ * if the clause originally came from WINDOW, and is NULL if it originally
1403
+ * was an OVER clause (but note that we collapse out duplicate OVERs).
1404
+ * partitionClause and orderClause are lists of SortGroupClause structs.
1405
+ * If we have RANGE with offset PRECEDING/FOLLOWING, the semantics of that are
1406
+ * specified by startInRangeFunc/inRangeColl/inRangeAsc/inRangeNullsFirst
1407
+ * for the start offset, or endInRangeFunc/inRange* for the end offset.
1408
+ * winref is an ID number referenced by WindowFunc nodes; it must be unique
1409
+ * among the members of a Query's windowClause list.
1410
+ * When refname isn't null, the partitionClause is always copied from there;
1411
+ * the orderClause might or might not be copied (see copiedOrder); the framing
1412
+ * options are never copied, per spec.
1413
+ */
1414
+ typedef struct WindowClause
1415
+ {
1416
+ NodeTag type;
1417
+ char *name; /* window name (NULL in an OVER clause) */
1418
+ char *refname; /* referenced window name, if any */
1419
+ List *partitionClause; /* PARTITION BY list */
1420
+ List *orderClause; /* ORDER BY list */
1421
+ int frameOptions; /* frame_clause options, see WindowDef */
1422
+ Node *startOffset; /* expression for starting bound, if any */
1423
+ Node *endOffset; /* expression for ending bound, if any */
1424
+ List *runCondition; /* qual to help short-circuit execution */
1425
+ Oid startInRangeFunc; /* in_range function for startOffset */
1426
+ Oid endInRangeFunc; /* in_range function for endOffset */
1427
+ Oid inRangeColl; /* collation for in_range tests */
1428
+ bool inRangeAsc; /* use ASC sort order for in_range tests? */
1429
+ bool inRangeNullsFirst; /* nulls sort first for in_range tests? */
1430
+ Index winref; /* ID referenced by window functions */
1431
+ bool copiedOrder; /* did we copy orderClause from refname? */
1432
+ } WindowClause;
1433
+
1434
+ /*
1435
+ * RowMarkClause -
1436
+ * parser output representation of FOR [KEY] UPDATE/SHARE clauses
1437
+ *
1438
+ * Query.rowMarks contains a separate RowMarkClause node for each relation
1439
+ * identified as a FOR [KEY] UPDATE/SHARE target. If one of these clauses
1440
+ * is applied to a subquery, we generate RowMarkClauses for all normal and
1441
+ * subquery rels in the subquery, but they are marked pushedDown = true to
1442
+ * distinguish them from clauses that were explicitly written at this query
1443
+ * level. Also, Query.hasForUpdate tells whether there were explicit FOR
1444
+ * UPDATE/SHARE/KEY SHARE clauses in the current query level.
1445
+ */
1446
+ typedef struct RowMarkClause
1447
+ {
1448
+ NodeTag type;
1449
+ Index rti; /* range table index of target relation */
1450
+ LockClauseStrength strength;
1451
+ LockWaitPolicy waitPolicy; /* NOWAIT and SKIP LOCKED */
1452
+ bool pushedDown; /* pushed down from higher query level? */
1453
+ } RowMarkClause;
1454
+
1455
+ /*
1456
+ * WithClause -
1457
+ * representation of WITH clause
1458
+ *
1459
+ * Note: WithClause does not propagate into the Query representation;
1460
+ * but CommonTableExpr does.
1461
+ */
1462
+ typedef struct WithClause
1463
+ {
1464
+ NodeTag type;
1465
+ List *ctes; /* list of CommonTableExprs */
1466
+ bool recursive; /* true = WITH RECURSIVE */
1467
+ int location; /* token location, or -1 if unknown */
1468
+ } WithClause;
1469
+
1470
+ /*
1471
+ * InferClause -
1472
+ * ON CONFLICT unique index inference clause
1473
+ *
1474
+ * Note: InferClause does not propagate into the Query representation.
1475
+ */
1476
+ typedef struct InferClause
1477
+ {
1478
+ NodeTag type;
1479
+ List *indexElems; /* IndexElems to infer unique index */
1480
+ Node *whereClause; /* qualification (partial-index predicate) */
1481
+ char *conname; /* Constraint name, or NULL if unnamed */
1482
+ int location; /* token location, or -1 if unknown */
1483
+ } InferClause;
1484
+
1485
+ /*
1486
+ * OnConflictClause -
1487
+ * representation of ON CONFLICT clause
1488
+ *
1489
+ * Note: OnConflictClause does not propagate into the Query representation.
1490
+ */
1491
+ typedef struct OnConflictClause
1492
+ {
1493
+ NodeTag type;
1494
+ OnConflictAction action; /* DO NOTHING or UPDATE? */
1495
+ InferClause *infer; /* Optional index inference clause */
1496
+ List *targetList; /* the target list (of ResTarget) */
1497
+ Node *whereClause; /* qualifications */
1498
+ int location; /* token location, or -1 if unknown */
1499
+ } OnConflictClause;
1500
+
1501
+ /*
1502
+ * CommonTableExpr -
1503
+ * representation of WITH list element
1504
+ */
1505
+
1506
+ typedef enum CTEMaterialize
1507
+ {
1508
+ CTEMaterializeDefault, /* no option specified */
1509
+ CTEMaterializeAlways, /* MATERIALIZED */
1510
+ CTEMaterializeNever /* NOT MATERIALIZED */
1511
+ } CTEMaterialize;
1512
+
1513
+ typedef struct CTESearchClause
1514
+ {
1515
+ NodeTag type;
1516
+ List *search_col_list;
1517
+ bool search_breadth_first;
1518
+ char *search_seq_column;
1519
+ int location;
1520
+ } CTESearchClause;
1521
+
1522
+ typedef struct CTECycleClause
1523
+ {
1524
+ NodeTag type;
1525
+ List *cycle_col_list;
1526
+ char *cycle_mark_column;
1527
+ Node *cycle_mark_value;
1528
+ Node *cycle_mark_default;
1529
+ char *cycle_path_column;
1530
+ int location;
1531
+ /* These fields are set during parse analysis: */
1532
+ Oid cycle_mark_type; /* common type of _value and _default */
1533
+ int cycle_mark_typmod;
1534
+ Oid cycle_mark_collation;
1535
+ Oid cycle_mark_neop; /* <> operator for type */
1536
+ } CTECycleClause;
1537
+
1538
+ typedef struct CommonTableExpr
1539
+ {
1540
+ NodeTag type;
1541
+ char *ctename; /* query name (never qualified) */
1542
+ List *aliascolnames; /* optional list of column names */
1543
+ CTEMaterialize ctematerialized; /* is this an optimization fence? */
1544
+ /* SelectStmt/InsertStmt/etc before parse analysis, Query afterwards: */
1545
+ Node *ctequery; /* the CTE's subquery */
1546
+ CTESearchClause *search_clause;
1547
+ CTECycleClause *cycle_clause;
1548
+ int location; /* token location, or -1 if unknown */
1549
+ /* These fields are set during parse analysis: */
1550
+ bool cterecursive; /* is this CTE actually recursive? */
1551
+ int cterefcount; /* number of RTEs referencing this CTE
1552
+ * (excluding internal self-references) */
1553
+ List *ctecolnames; /* list of output column names */
1554
+ List *ctecoltypes; /* OID list of output column type OIDs */
1555
+ List *ctecoltypmods; /* integer list of output column typmods */
1556
+ List *ctecolcollations; /* OID list of column collation OIDs */
1557
+ } CommonTableExpr;
1558
+
1559
+ /* Convenience macro to get the output tlist of a CTE's query */
1560
+ #define GetCTETargetList(cte) \
1561
+ (AssertMacro(IsA((cte)->ctequery, Query)), \
1562
+ ((Query *) (cte)->ctequery)->commandType == CMD_SELECT ? \
1563
+ ((Query *) (cte)->ctequery)->targetList : \
1564
+ ((Query *) (cte)->ctequery)->returningList)
1565
+
1566
+ /*
1567
+ * MergeWhenClause -
1568
+ * raw parser representation of a WHEN clause in a MERGE statement
1569
+ *
1570
+ * This is transformed into MergeAction by parse analysis
1571
+ */
1572
+ typedef struct MergeWhenClause
1573
+ {
1574
+ NodeTag type;
1575
+ bool matched; /* true=MATCHED, false=NOT MATCHED */
1576
+ CmdType commandType; /* INSERT/UPDATE/DELETE/DO NOTHING */
1577
+ OverridingKind override; /* OVERRIDING clause */
1578
+ Node *condition; /* WHEN conditions (raw parser) */
1579
+ List *targetList; /* INSERT/UPDATE targetlist */
1580
+ /* the following members are only used in INSERT actions */
1581
+ List *values; /* VALUES to INSERT, or NULL */
1582
+ } MergeWhenClause;
1583
+
1584
+ /*
1585
+ * MergeAction -
1586
+ * Transformed representation of a WHEN clause in a MERGE statement
1587
+ */
1588
+ typedef struct MergeAction
1589
+ {
1590
+ NodeTag type;
1591
+ bool matched; /* true=MATCHED, false=NOT MATCHED */
1592
+ CmdType commandType; /* INSERT/UPDATE/DELETE/DO NOTHING */
1593
+ OverridingKind override; /* OVERRIDING clause */
1594
+ Node *qual; /* transformed WHEN conditions */
1595
+ List *targetList; /* the target list (of TargetEntry) */
1596
+ List *updateColnos; /* target attribute numbers of an UPDATE */
1597
+ } MergeAction;
1598
+
1599
+ /*
1600
+ * TriggerTransition -
1601
+ * representation of transition row or table naming clause
1602
+ *
1603
+ * Only transition tables are initially supported in the syntax, and only for
1604
+ * AFTER triggers, but other permutations are accepted by the parser so we can
1605
+ * give a meaningful message from C code.
1606
+ */
1607
+ typedef struct TriggerTransition
1608
+ {
1609
+ NodeTag type;
1610
+ char *name;
1611
+ bool isNew;
1612
+ bool isTable;
1613
+ } TriggerTransition;
1614
+
1615
+ /*****************************************************************************
1616
+ * Raw Grammar Output Statements
1617
+ *****************************************************************************/
1618
+
1619
+ /*
1620
+ * RawStmt --- container for any one statement's raw parse tree
1621
+ *
1622
+ * Parse analysis converts a raw parse tree headed by a RawStmt node into
1623
+ * an analyzed statement headed by a Query node. For optimizable statements,
1624
+ * the conversion is complex. For utility statements, the parser usually just
1625
+ * transfers the raw parse tree (sans RawStmt) into the utilityStmt field of
1626
+ * the Query node, and all the useful work happens at execution time.
1627
+ *
1628
+ * stmt_location/stmt_len identify the portion of the source text string
1629
+ * containing this raw statement (useful for multi-statement strings).
1630
+ */
1631
+ typedef struct RawStmt
1632
+ {
1633
+ NodeTag type;
1634
+ Node *stmt; /* raw parse tree */
1635
+ int stmt_location; /* start location, or -1 if unknown */
1636
+ int stmt_len; /* length in bytes; 0 means "rest of string" */
1637
+ } RawStmt;
1638
+
1639
+ /*****************************************************************************
1640
+ * Optimizable Statements
1641
+ *****************************************************************************/
1642
+
1643
+ /* ----------------------
1644
+ * Insert Statement
1645
+ *
1646
+ * The source expression is represented by SelectStmt for both the
1647
+ * SELECT and VALUES cases. If selectStmt is NULL, then the query
1648
+ * is INSERT ... DEFAULT VALUES.
1649
+ * ----------------------
1650
+ */
1651
+ typedef struct InsertStmt
1652
+ {
1653
+ NodeTag type;
1654
+ RangeVar *relation; /* relation to insert into */
1655
+ List *cols; /* optional: names of the target columns */
1656
+ Node *selectStmt; /* the source SELECT/VALUES, or NULL */
1657
+ OnConflictClause *onConflictClause; /* ON CONFLICT clause */
1658
+ List *returningList; /* list of expressions to return */
1659
+ WithClause *withClause; /* WITH clause */
1660
+ OverridingKind override; /* OVERRIDING clause */
1661
+ } InsertStmt;
1662
+
1663
+ /* ----------------------
1664
+ * Delete Statement
1665
+ * ----------------------
1666
+ */
1667
+ typedef struct DeleteStmt
1668
+ {
1669
+ NodeTag type;
1670
+ RangeVar *relation; /* relation to delete from */
1671
+ List *usingClause; /* optional using clause for more tables */
1672
+ Node *whereClause; /* qualifications */
1673
+ List *returningList; /* list of expressions to return */
1674
+ WithClause *withClause; /* WITH clause */
1675
+ } DeleteStmt;
1676
+
1677
+ /* ----------------------
1678
+ * Update Statement
1679
+ * ----------------------
1680
+ */
1681
+ typedef struct UpdateStmt
1682
+ {
1683
+ NodeTag type;
1684
+ RangeVar *relation; /* relation to update */
1685
+ List *targetList; /* the target list (of ResTarget) */
1686
+ Node *whereClause; /* qualifications */
1687
+ List *fromClause; /* optional from clause for more tables */
1688
+ List *returningList; /* list of expressions to return */
1689
+ WithClause *withClause; /* WITH clause */
1690
+ } UpdateStmt;
1691
+
1692
+ /* ----------------------
1693
+ * Merge Statement
1694
+ * ----------------------
1695
+ */
1696
+ typedef struct MergeStmt
1697
+ {
1698
+ NodeTag type;
1699
+ RangeVar *relation; /* target relation to merge into */
1700
+ Node *sourceRelation; /* source relation */
1701
+ Node *joinCondition; /* join condition between source and target */
1702
+ List *mergeWhenClauses; /* list of MergeWhenClause(es) */
1703
+ WithClause *withClause; /* WITH clause */
1704
+ } MergeStmt;
1705
+
1706
+ /* ----------------------
1707
+ * Select Statement
1708
+ *
1709
+ * A "simple" SELECT is represented in the output of gram.y by a single
1710
+ * SelectStmt node; so is a VALUES construct. A query containing set
1711
+ * operators (UNION, INTERSECT, EXCEPT) is represented by a tree of SelectStmt
1712
+ * nodes, in which the leaf nodes are component SELECTs and the internal nodes
1713
+ * represent UNION, INTERSECT, or EXCEPT operators. Using the same node
1714
+ * type for both leaf and internal nodes allows gram.y to stick ORDER BY,
1715
+ * LIMIT, etc, clause values into a SELECT statement without worrying
1716
+ * whether it is a simple or compound SELECT.
1717
+ * ----------------------
1718
+ */
1719
+ typedef enum SetOperation
1720
+ {
1721
+ SETOP_NONE = 0,
1722
+ SETOP_UNION,
1723
+ SETOP_INTERSECT,
1724
+ SETOP_EXCEPT
1725
+ } SetOperation;
1726
+
1727
+ typedef struct SelectStmt
1728
+ {
1729
+ NodeTag type;
1730
+
1731
+ /*
1732
+ * These fields are used only in "leaf" SelectStmts.
1733
+ */
1734
+ List *distinctClause; /* NULL, list of DISTINCT ON exprs, or
1735
+ * lcons(NIL,NIL) for all (SELECT DISTINCT) */
1736
+ IntoClause *intoClause; /* target for SELECT INTO */
1737
+ List *targetList; /* the target list (of ResTarget) */
1738
+ List *fromClause; /* the FROM clause */
1739
+ Node *whereClause; /* WHERE qualification */
1740
+ List *groupClause; /* GROUP BY clauses */
1741
+ bool groupDistinct; /* Is this GROUP BY DISTINCT? */
1742
+ Node *havingClause; /* HAVING conditional-expression */
1743
+ List *windowClause; /* WINDOW window_name AS (...), ... */
1744
+
1745
+ /*
1746
+ * In a "leaf" node representing a VALUES list, the above fields are all
1747
+ * null, and instead this field is set. Note that the elements of the
1748
+ * sublists are just expressions, without ResTarget decoration. Also note
1749
+ * that a list element can be DEFAULT (represented as a SetToDefault
1750
+ * node), regardless of the context of the VALUES list. It's up to parse
1751
+ * analysis to reject that where not valid.
1752
+ */
1753
+ List *valuesLists; /* untransformed list of expression lists */
1754
+
1755
+ /*
1756
+ * These fields are used in both "leaf" SelectStmts and upper-level
1757
+ * SelectStmts.
1758
+ */
1759
+ List *sortClause; /* sort clause (a list of SortBy's) */
1760
+ Node *limitOffset; /* # of result tuples to skip */
1761
+ Node *limitCount; /* # of result tuples to return */
1762
+ LimitOption limitOption; /* limit type */
1763
+ List *lockingClause; /* FOR UPDATE (list of LockingClause's) */
1764
+ WithClause *withClause; /* WITH clause */
1765
+
1766
+ /*
1767
+ * These fields are used only in upper-level SelectStmts.
1768
+ */
1769
+ SetOperation op; /* type of set op */
1770
+ bool all; /* ALL specified? */
1771
+ struct SelectStmt *larg; /* left child */
1772
+ struct SelectStmt *rarg; /* right child */
1773
+ /* Eventually add fields for CORRESPONDING spec here */
1774
+ } SelectStmt;
1775
+
1776
+
1777
+ /* ----------------------
1778
+ * Set Operation node for post-analysis query trees
1779
+ *
1780
+ * After parse analysis, a SELECT with set operations is represented by a
1781
+ * top-level Query node containing the leaf SELECTs as subqueries in its
1782
+ * range table. Its setOperations field shows the tree of set operations,
1783
+ * with leaf SelectStmt nodes replaced by RangeTblRef nodes, and internal
1784
+ * nodes replaced by SetOperationStmt nodes. Information about the output
1785
+ * column types is added, too. (Note that the child nodes do not necessarily
1786
+ * produce these types directly, but we've checked that their output types
1787
+ * can be coerced to the output column type.) Also, if it's not UNION ALL,
1788
+ * information about the types' sort/group semantics is provided in the form
1789
+ * of a SortGroupClause list (same representation as, eg, DISTINCT).
1790
+ * The resolved common column collations are provided too; but note that if
1791
+ * it's not UNION ALL, it's okay for a column to not have a common collation,
1792
+ * so a member of the colCollations list could be InvalidOid even though the
1793
+ * column has a collatable type.
1794
+ * ----------------------
1795
+ */
1796
+ typedef struct SetOperationStmt
1797
+ {
1798
+ NodeTag type;
1799
+ SetOperation op; /* type of set op */
1800
+ bool all; /* ALL specified? */
1801
+ Node *larg; /* left child */
1802
+ Node *rarg; /* right child */
1803
+ /* Eventually add fields for CORRESPONDING spec here */
1804
+
1805
+ /* Fields derived during parse analysis: */
1806
+ List *colTypes; /* OID list of output column type OIDs */
1807
+ List *colTypmods; /* integer list of output column typmods */
1808
+ List *colCollations; /* OID list of output column collation OIDs */
1809
+ List *groupClauses; /* a list of SortGroupClause's */
1810
+ /* groupClauses is NIL if UNION ALL, but must be set otherwise */
1811
+ } SetOperationStmt;
1812
+
1813
+
1814
+ /*
1815
+ * RETURN statement (inside SQL function body)
1816
+ */
1817
+ typedef struct ReturnStmt
1818
+ {
1819
+ NodeTag type;
1820
+ Node *returnval;
1821
+ } ReturnStmt;
1822
+
1823
+
1824
+ /* ----------------------
1825
+ * PL/pgSQL Assignment Statement
1826
+ *
1827
+ * Like SelectStmt, this is transformed into a SELECT Query.
1828
+ * However, the targetlist of the result looks more like an UPDATE.
1829
+ * ----------------------
1830
+ */
1831
+ typedef struct PLAssignStmt
1832
+ {
1833
+ NodeTag type;
1834
+
1835
+ char *name; /* initial column name */
1836
+ List *indirection; /* subscripts and field names, if any */
1837
+ int nnames; /* number of names to use in ColumnRef */
1838
+ SelectStmt *val; /* the PL/pgSQL expression to assign */
1839
+ int location; /* name's token location, or -1 if unknown */
1840
+ } PLAssignStmt;
1841
+
1842
+
1843
+ /*****************************************************************************
1844
+ * Other Statements (no optimizations required)
1845
+ *
1846
+ * These are not touched by parser/analyze.c except to put them into
1847
+ * the utilityStmt field of a Query. This is eventually passed to
1848
+ * ProcessUtility (by-passing rewriting and planning). Some of the
1849
+ * statements do need attention from parse analysis, and this is
1850
+ * done by routines in parser/parse_utilcmd.c after ProcessUtility
1851
+ * receives the command for execution.
1852
+ * DECLARE CURSOR, EXPLAIN, and CREATE TABLE AS are special cases:
1853
+ * they contain optimizable statements, which get processed normally
1854
+ * by parser/analyze.c.
1855
+ *****************************************************************************/
1856
+
1857
+ /*
1858
+ * When a command can act on several kinds of objects with only one
1859
+ * parse structure required, use these constants to designate the
1860
+ * object type. Note that commands typically don't support all the types.
1861
+ */
1862
+
1863
+ typedef enum ObjectType
1864
+ {
1865
+ OBJECT_ACCESS_METHOD,
1866
+ OBJECT_AGGREGATE,
1867
+ OBJECT_AMOP,
1868
+ OBJECT_AMPROC,
1869
+ OBJECT_ATTRIBUTE, /* type's attribute, when distinct from column */
1870
+ OBJECT_CAST,
1871
+ OBJECT_COLUMN,
1872
+ OBJECT_COLLATION,
1873
+ OBJECT_CONVERSION,
1874
+ OBJECT_DATABASE,
1875
+ OBJECT_DEFAULT,
1876
+ OBJECT_DEFACL,
1877
+ OBJECT_DOMAIN,
1878
+ OBJECT_DOMCONSTRAINT,
1879
+ OBJECT_EVENT_TRIGGER,
1880
+ OBJECT_EXTENSION,
1881
+ OBJECT_FDW,
1882
+ OBJECT_FOREIGN_SERVER,
1883
+ OBJECT_FOREIGN_TABLE,
1884
+ OBJECT_FUNCTION,
1885
+ OBJECT_INDEX,
1886
+ OBJECT_LANGUAGE,
1887
+ OBJECT_LARGEOBJECT,
1888
+ OBJECT_MATVIEW,
1889
+ OBJECT_OPCLASS,
1890
+ OBJECT_OPERATOR,
1891
+ OBJECT_OPFAMILY,
1892
+ OBJECT_PARAMETER_ACL,
1893
+ OBJECT_POLICY,
1894
+ OBJECT_PROCEDURE,
1895
+ OBJECT_PUBLICATION,
1896
+ OBJECT_PUBLICATION_NAMESPACE,
1897
+ OBJECT_PUBLICATION_REL,
1898
+ OBJECT_ROLE,
1899
+ OBJECT_ROUTINE,
1900
+ OBJECT_RULE,
1901
+ OBJECT_SCHEMA,
1902
+ OBJECT_SEQUENCE,
1903
+ OBJECT_SUBSCRIPTION,
1904
+ OBJECT_STATISTIC_EXT,
1905
+ OBJECT_TABCONSTRAINT,
1906
+ OBJECT_TABLE,
1907
+ OBJECT_YBTABLEGROUP,
1908
+ OBJECT_TABLESPACE,
1909
+ OBJECT_TRANSFORM,
1910
+ OBJECT_TRIGGER,
1911
+ OBJECT_TSCONFIGURATION,
1912
+ OBJECT_TSDICTIONARY,
1913
+ OBJECT_TSPARSER,
1914
+ OBJECT_TSTEMPLATE,
1915
+ OBJECT_TYPE,
1916
+ OBJECT_USER_MAPPING,
1917
+ OBJECT_VIEW,
1918
+ OBJECT_YBPROFILE
1919
+ } ObjectType;
1920
+
1921
+ /* ----------------------
1922
+ * Create Schema Statement
1923
+ *
1924
+ * NOTE: the schemaElts list contains raw parsetrees for component statements
1925
+ * of the schema, such as CREATE TABLE, GRANT, etc. These are analyzed and
1926
+ * executed after the schema itself is created.
1927
+ * ----------------------
1928
+ */
1929
+ typedef struct CreateSchemaStmt
1930
+ {
1931
+ NodeTag type;
1932
+ char *schemaname; /* the name of the schema to create */
1933
+ RoleSpec *authrole; /* the owner of the created schema */
1934
+ List *schemaElts; /* schema components (list of parsenodes) */
1935
+ bool if_not_exists; /* just do nothing if schema already exists? */
1936
+ } CreateSchemaStmt;
1937
+
1938
+ typedef enum DropBehavior
1939
+ {
1940
+ DROP_RESTRICT, /* drop fails if any dependent objects */
1941
+ DROP_CASCADE /* remove dependent objects too */
1942
+ } DropBehavior;
1943
+
1944
+ /* ----------------------
1945
+ * Alter Table
1946
+ * ----------------------
1947
+ */
1948
+ typedef struct AlterTableStmt
1949
+ {
1950
+ NodeTag type;
1951
+ RangeVar *relation; /* table to work on */
1952
+ List *cmds; /* list of subcommands */
1953
+ ObjectType objtype; /* type of object */
1954
+ bool missing_ok; /* skip error if table missing */
1955
+ } AlterTableStmt;
1956
+
1957
+ typedef enum AlterTableType
1958
+ {
1959
+ AT_AddColumn, /* add column */
1960
+ AT_AddColumnRecurse, /* internal to commands/tablecmds.c */
1961
+ AT_AddColumnToView, /* implicitly via CREATE OR REPLACE VIEW */
1962
+ AT_ColumnDefault, /* alter column default */
1963
+ AT_CookedColumnDefault, /* add a pre-cooked column default */
1964
+ AT_DropNotNull, /* alter column drop not null */
1965
+ AT_SetNotNull, /* alter column set not null */
1966
+ AT_DropExpression, /* alter column drop expression */
1967
+ AT_CheckNotNull, /* check column is already marked not null */
1968
+ AT_SetStatistics, /* alter column set statistics */
1969
+ AT_SetOptions, /* alter column set ( options ) */
1970
+ AT_ResetOptions, /* alter column reset ( options ) */
1971
+ AT_SetStorage, /* alter column set storage */
1972
+ AT_SetCompression, /* alter column set compression */
1973
+ AT_DropColumn, /* drop column */
1974
+ AT_DropColumnRecurse, /* internal to commands/tablecmds.c */
1975
+ AT_AddIndex, /* add index */
1976
+ AT_ReAddIndex, /* internal to commands/tablecmds.c */
1977
+ AT_AddConstraint, /* add constraint */
1978
+ AT_AddConstraintRecurse, /* internal to commands/tablecmds.c */
1979
+ AT_ReAddConstraint, /* internal to commands/tablecmds.c */
1980
+ AT_ReAddDomainConstraint, /* internal to commands/tablecmds.c */
1981
+ AT_AlterConstraint, /* alter constraint */
1982
+ AT_ValidateConstraint, /* validate constraint */
1983
+ AT_ValidateConstraintRecurse, /* internal to commands/tablecmds.c */
1984
+ AT_AddIndexConstraint, /* add constraint using existing index */
1985
+ AT_DropConstraint, /* drop constraint */
1986
+ AT_DropConstraintRecurse, /* internal to commands/tablecmds.c */
1987
+ AT_ReAddComment, /* internal to commands/tablecmds.c */
1988
+ AT_AlterColumnType, /* alter column type */
1989
+ AT_AlterColumnGenericOptions, /* alter column OPTIONS (...) */
1990
+ AT_ChangeOwner, /* change owner */
1991
+ AT_ClusterOn, /* CLUSTER ON */
1992
+ AT_DropCluster, /* SET WITHOUT CLUSTER */
1993
+ AT_SetLogged, /* SET LOGGED */
1994
+ AT_SetUnLogged, /* SET UNLOGGED */
1995
+ AT_DropOids, /* SET WITHOUT OIDS */
1996
+ AT_SetAccessMethod, /* SET ACCESS METHOD */
1997
+ AT_SetTableSpace, /* SET TABLESPACE */
1998
+ AT_SetRelOptions, /* SET (...) -- AM specific parameters */
1999
+ AT_ResetRelOptions, /* RESET (...) -- AM specific parameters */
2000
+ AT_ReplaceRelOptions, /* replace reloption list in its entirety */
2001
+ AT_EnableTrig, /* ENABLE TRIGGER name */
2002
+ AT_EnableAlwaysTrig, /* ENABLE ALWAYS TRIGGER name */
2003
+ AT_EnableReplicaTrig, /* ENABLE REPLICA TRIGGER name */
2004
+ AT_DisableTrig, /* DISABLE TRIGGER name */
2005
+ AT_EnableTrigAll, /* ENABLE TRIGGER ALL */
2006
+ AT_DisableTrigAll, /* DISABLE TRIGGER ALL */
2007
+ AT_EnableTrigUser, /* ENABLE TRIGGER USER */
2008
+ AT_DisableTrigUser, /* DISABLE TRIGGER USER */
2009
+ AT_EnableRule, /* ENABLE RULE name */
2010
+ AT_EnableAlwaysRule, /* ENABLE ALWAYS RULE name */
2011
+ AT_EnableReplicaRule, /* ENABLE REPLICA RULE name */
2012
+ AT_DisableRule, /* DISABLE RULE name */
2013
+ AT_AddInherit, /* INHERIT parent */
2014
+ AT_DropInherit, /* NO INHERIT parent */
2015
+ AT_AddOf, /* OF <type_name> */
2016
+ AT_DropOf, /* NOT OF */
2017
+ AT_ReplicaIdentity, /* REPLICA IDENTITY */
2018
+ AT_EnableRowSecurity, /* ENABLE ROW SECURITY */
2019
+ AT_DisableRowSecurity, /* DISABLE ROW SECURITY */
2020
+ AT_ForceRowSecurity, /* FORCE ROW SECURITY */
2021
+ AT_NoForceRowSecurity, /* NO FORCE ROW SECURITY */
2022
+ AT_GenericOptions, /* OPTIONS (...) */
2023
+ AT_AttachPartition, /* ATTACH PARTITION */
2024
+ AT_DetachPartition, /* DETACH PARTITION */
2025
+ AT_DetachPartitionFinalize, /* DETACH PARTITION FINALIZE */
2026
+ AT_AddIdentity, /* ADD IDENTITY */
2027
+ AT_SetIdentity, /* SET identity column options */
2028
+ AT_DropIdentity, /* DROP IDENTITY */
2029
+ AT_ReAddStatistics, /* internal to commands/tablecmds.c */
2030
+ AT_YbAlterIndexAttributeType /* YB: update index pg_attribute entries
2031
+ * in place for ALTER TYPE, when possible */
2032
+ } AlterTableType;
2033
+
2034
+ typedef struct ReplicaIdentityStmt
2035
+ {
2036
+ NodeTag type;
2037
+ char identity_type;
2038
+ char *name;
2039
+ } ReplicaIdentityStmt;
2040
+
2041
+ typedef struct AlterTableCmd /* one subcommand of an ALTER TABLE */
2042
+ {
2043
+ NodeTag type;
2044
+ AlterTableType subtype; /* Type of table alteration to apply */
2045
+ char *name; /* column, constraint, or trigger to act on,
2046
+ * or tablespace */
2047
+ int16 num; /* attribute number for columns referenced by
2048
+ * number */
2049
+ RoleSpec *newowner;
2050
+ Node *def; /* definition of new column, index,
2051
+ * constraint, or parent table */
2052
+ DropBehavior behavior; /* RESTRICT or CASCADE for DROP cases */
2053
+ bool missing_ok; /* skip error if missing? */
2054
+ bool recurse; /* exec-time recursion */
2055
+
2056
+ /* YB */
2057
+ bool yb_is_add_primary_key; /* checks if adding primary key */
2058
+ bool yb_cascade; /* to restrict movement of single table in
2059
+ * colocated tablespace */
2060
+ Oid yb_old_index_oid; /* OID of old index; used to identify the
2061
+ * index for in-place pg_attribute update
2062
+ * during ALTER TYPE */
2063
+ } AlterTableCmd;
2064
+
2065
+
2066
+ /* ----------------------
2067
+ * Alter Collation
2068
+ * ----------------------
2069
+ */
2070
+ typedef struct AlterCollationStmt
2071
+ {
2072
+ NodeTag type;
2073
+ List *collname;
2074
+ } AlterCollationStmt;
2075
+
2076
+
2077
+ /* ----------------------
2078
+ * Alter Domain
2079
+ *
2080
+ * The fields are used in different ways by the different variants of
2081
+ * this command.
2082
+ * ----------------------
2083
+ */
2084
+ typedef struct AlterDomainStmt
2085
+ {
2086
+ NodeTag type;
2087
+ char subtype; /*------------
2088
+ * T = alter column default
2089
+ * N = alter column drop not null
2090
+ * O = alter column set not null
2091
+ * C = add constraint
2092
+ * X = drop constraint
2093
+ *------------
2094
+ */
2095
+ List *typeName; /* domain to work on */
2096
+ char *name; /* column or constraint name to act on */
2097
+ Node *def; /* definition of default or constraint */
2098
+ DropBehavior behavior; /* RESTRICT or CASCADE for DROP cases */
2099
+ bool missing_ok; /* skip error if missing? */
2100
+ } AlterDomainStmt;
2101
+
2102
+
2103
+ /* ----------------------
2104
+ * Grant|Revoke Statement
2105
+ * ----------------------
2106
+ */
2107
+ typedef enum GrantTargetType
2108
+ {
2109
+ ACL_TARGET_OBJECT, /* grant on specific named object(s) */
2110
+ ACL_TARGET_ALL_IN_SCHEMA, /* grant on all objects in given schema(s) */
2111
+ ACL_TARGET_DEFAULTS /* ALTER DEFAULT PRIVILEGES */
2112
+ } GrantTargetType;
2113
+
2114
+ typedef struct GrantStmt
2115
+ {
2116
+ NodeTag type;
2117
+ bool is_grant; /* true = GRANT, false = REVOKE */
2118
+ GrantTargetType targtype; /* type of the grant target */
2119
+ ObjectType objtype; /* kind of object being operated on */
2120
+ List *objects; /* list of RangeVar nodes, ObjectWithArgs
2121
+ * nodes, or plain names (as String values) */
2122
+ List *privileges; /* list of AccessPriv nodes */
2123
+ /* privileges == NIL denotes ALL PRIVILEGES */
2124
+ List *grantees; /* list of RoleSpec nodes */
2125
+ bool grant_option; /* grant or revoke grant option */
2126
+ RoleSpec *grantor;
2127
+ DropBehavior behavior; /* drop behavior (for REVOKE) */
2128
+ } GrantStmt;
2129
+
2130
+ /*
2131
+ * ObjectWithArgs represents a function/procedure/operator name plus parameter
2132
+ * identification.
2133
+ *
2134
+ * objargs includes only the types of the input parameters of the object.
2135
+ * In some contexts, that will be all we have, and it's enough to look up
2136
+ * objects according to the traditional Postgres rules (i.e., when only input
2137
+ * arguments matter).
2138
+ *
2139
+ * objfuncargs, if not NIL, carries the full specification of the parameter
2140
+ * list, including parameter mode annotations.
2141
+ *
2142
+ * Some grammar productions can set args_unspecified = true instead of
2143
+ * providing parameter info. In this case, lookup will succeed only if
2144
+ * the object name is unique. Note that otherwise, NIL parameter lists
2145
+ * mean zero arguments.
2146
+ */
2147
+ typedef struct ObjectWithArgs
2148
+ {
2149
+ NodeTag type;
2150
+ List *objname; /* qualified name of function/operator */
2151
+ List *objargs; /* list of Typename nodes (input args only) */
2152
+ List *objfuncargs; /* list of FunctionParameter nodes */
2153
+ bool args_unspecified; /* argument list was omitted? */
2154
+ } ObjectWithArgs;
2155
+
2156
+ /*
2157
+ * An access privilege, with optional list of column names
2158
+ * priv_name == NULL denotes ALL PRIVILEGES (only used with a column list)
2159
+ * cols == NIL denotes "all columns"
2160
+ * Note that simple "ALL PRIVILEGES" is represented as a NIL list, not
2161
+ * an AccessPriv with both fields null.
2162
+ */
2163
+ typedef struct AccessPriv
2164
+ {
2165
+ NodeTag type;
2166
+ char *priv_name; /* string name of privilege */
2167
+ List *cols; /* list of String */
2168
+ } AccessPriv;
2169
+
2170
+ /* ----------------------
2171
+ * Grant/Revoke Role Statement
2172
+ *
2173
+ * Note: because of the parsing ambiguity with the GRANT <privileges>
2174
+ * statement, granted_roles is a list of AccessPriv; the execution code
2175
+ * should complain if any column lists appear. grantee_roles is a list
2176
+ * of role names, as String values.
2177
+ * ----------------------
2178
+ */
2179
+ typedef struct GrantRoleStmt
2180
+ {
2181
+ NodeTag type;
2182
+ List *granted_roles; /* list of roles to be granted/revoked */
2183
+ List *grantee_roles; /* list of member roles to add/delete */
2184
+ bool is_grant; /* true = GRANT, false = REVOKE */
2185
+ bool admin_opt; /* with admin option */
2186
+ RoleSpec *grantor; /* set grantor to other than current role */
2187
+ DropBehavior behavior; /* drop behavior (for REVOKE) */
2188
+ } GrantRoleStmt;
2189
+
2190
+ /* ----------------------
2191
+ * Alter Default Privileges Statement
2192
+ * ----------------------
2193
+ */
2194
+ typedef struct AlterDefaultPrivilegesStmt
2195
+ {
2196
+ NodeTag type;
2197
+ List *options; /* list of DefElem */
2198
+ GrantStmt *action; /* GRANT/REVOKE action (with objects=NIL) */
2199
+ } AlterDefaultPrivilegesStmt;
2200
+
2201
+ /* ----------------------
2202
+ * Copy Statement
2203
+ *
2204
+ * We support "COPY relation FROM file", "COPY relation TO file", and
2205
+ * "COPY (query) TO file". In any given CopyStmt, exactly one of "relation"
2206
+ * and "query" must be non-NULL.
2207
+ * ----------------------
2208
+ */
2209
+ typedef struct CopyStmt
2210
+ {
2211
+ NodeTag type;
2212
+ RangeVar *relation; /* the relation to copy */
2213
+ Node *query; /* the query (SELECT or DML statement with
2214
+ * RETURNING) to copy, as a raw parse tree */
2215
+ List *attlist; /* List of column names (as Strings), or NIL
2216
+ * for all columns */
2217
+ bool is_from; /* TO or FROM */
2218
+ bool is_program; /* is 'filename' a program to popen? */
2219
+ char *filename; /* filename, or NULL for STDIN/STDOUT */
2220
+ List *options; /* List of DefElem nodes */
2221
+ Node *whereClause; /* WHERE condition (or NULL) */
2222
+ } CopyStmt;
2223
+
2224
+ /* ----------------------
2225
+ * SET Statement (includes RESET)
2226
+ *
2227
+ * "SET var TO DEFAULT" and "RESET var" are semantically equivalent, but we
2228
+ * preserve the distinction in VariableSetKind for CreateCommandTag().
2229
+ * ----------------------
2230
+ */
2231
+ typedef enum VariableSetKind
2232
+ {
2233
+ VAR_SET_VALUE, /* SET var = value */
2234
+ VAR_SET_DEFAULT, /* SET var TO DEFAULT */
2235
+ VAR_SET_CURRENT, /* SET var FROM CURRENT */
2236
+ VAR_SET_MULTI, /* special case for SET TRANSACTION ... */
2237
+ VAR_RESET, /* RESET var */
2238
+ VAR_RESET_ALL /* RESET ALL */
2239
+ } VariableSetKind;
2240
+
2241
+ typedef struct VariableSetStmt
2242
+ {
2243
+ NodeTag type;
2244
+ VariableSetKind kind;
2245
+ char *name; /* variable to be set */
2246
+ List *args; /* List of A_Const nodes */
2247
+ bool is_local; /* SET LOCAL? */
2248
+ } VariableSetStmt;
2249
+
2250
+ /* ----------------------
2251
+ * Show Statement
2252
+ * ----------------------
2253
+ */
2254
+ typedef struct VariableShowStmt
2255
+ {
2256
+ NodeTag type;
2257
+ char *name;
2258
+ } VariableShowStmt;
2259
+
2260
+ /* ----------------------
2261
+ * Create Table Statement
2262
+ *
2263
+ * NOTE: in the raw gram.y output, ColumnDef and Constraint nodes are
2264
+ * intermixed in tableElts, and constraints is NIL. After parse analysis,
2265
+ * tableElts contains just ColumnDefs, and constraints contains just
2266
+ * Constraint nodes (in fact, only CONSTR_CHECK nodes, in the present
2267
+ * implementation).
2268
+ * ----------------------
2269
+ */
2270
+
2271
+ typedef struct CreateStmt
2272
+ {
2273
+ NodeTag type;
2274
+ RangeVar *relation; /* relation to create */
2275
+ List *tableElts; /* column definitions (list of ColumnDef) */
2276
+ List *inhRelations; /* relations to inherit from (list of
2277
+ * RangeVar) */
2278
+ PartitionBoundSpec *partbound; /* FOR VALUES clause */
2279
+ PartitionSpec *partspec; /* PARTITION BY clause */
2280
+ TypeName *ofTypename; /* OF typename */
2281
+ List *constraints; /* constraints (list of Constraint nodes) */
2282
+ List *options; /* options from WITH clause */
2283
+ OnCommitAction oncommit; /* what do we do at COMMIT? */
2284
+ char *tablespacename; /* table space to use, or NULL */
2285
+ char *accessMethod; /* table access method */
2286
+ bool if_not_exists; /* just do nothing if it already exists? */
2287
+
2288
+ /* YB */
2289
+ char *tablegroupname; /* tablegroup to use, or NULL */
2290
+ struct YbOptSplit *split_options; /* SPLIT statement options */
2291
+ } CreateStmt;
2292
+
2293
+ /* ----------
2294
+ * Definitions for constraints in CreateStmt
2295
+ *
2296
+ * Note that column defaults are treated as a type of constraint,
2297
+ * even though that's a bit odd semantically.
2298
+ *
2299
+ * For constraints that use expressions (CONSTR_CHECK, CONSTR_DEFAULT)
2300
+ * we may have the expression in either "raw" form (an untransformed
2301
+ * parse tree) or "cooked" form (the nodeToString representation of
2302
+ * an executable expression tree), depending on how this Constraint
2303
+ * node was created (by parsing, or by inheritance from an existing
2304
+ * relation). We should never have both in the same node!
2305
+ *
2306
+ * FKCONSTR_ACTION_xxx values are stored into pg_constraint.confupdtype
2307
+ * and pg_constraint.confdeltype columns; FKCONSTR_MATCH_xxx values are
2308
+ * stored into pg_constraint.confmatchtype. Changing the code values may
2309
+ * require an initdb!
2310
+ *
2311
+ * If skip_validation is true then we skip checking that the existing rows
2312
+ * in the table satisfy the constraint, and just install the catalog entries
2313
+ * for the constraint. A new FK constraint is marked as valid iff
2314
+ * initially_valid is true. (Usually skip_validation and initially_valid
2315
+ * are inverses, but we can set both true if the table is known empty.)
2316
+ *
2317
+ * Constraint attributes (DEFERRABLE etc) are initially represented as
2318
+ * separate Constraint nodes for simplicity of parsing. parse_utilcmd.c makes
2319
+ * a pass through the constraints list to insert the info into the appropriate
2320
+ * Constraint node.
2321
+ * ----------
2322
+ */
2323
+
2324
+ typedef enum ConstrType /* types of constraints */
2325
+ {
2326
+ CONSTR_NULL, /* not standard SQL, but a lot of people
2327
+ * expect it */
2328
+ CONSTR_NOTNULL,
2329
+ CONSTR_DEFAULT,
2330
+ CONSTR_IDENTITY,
2331
+ CONSTR_GENERATED,
2332
+ CONSTR_CHECK,
2333
+ CONSTR_PRIMARY,
2334
+ CONSTR_UNIQUE,
2335
+ CONSTR_EXCLUSION,
2336
+ CONSTR_FOREIGN,
2337
+ CONSTR_ATTR_DEFERRABLE, /* attributes for previous constraint node */
2338
+ CONSTR_ATTR_NOT_DEFERRABLE,
2339
+ CONSTR_ATTR_DEFERRED,
2340
+ CONSTR_ATTR_IMMEDIATE
2341
+ } ConstrType;
2342
+
2343
+ /* Foreign key action codes */
2344
+ #define FKCONSTR_ACTION_NOACTION 'a'
2345
+ #define FKCONSTR_ACTION_RESTRICT 'r'
2346
+ #define FKCONSTR_ACTION_CASCADE 'c'
2347
+ #define FKCONSTR_ACTION_SETNULL 'n'
2348
+ #define FKCONSTR_ACTION_SETDEFAULT 'd'
2349
+
2350
+ /* Foreign key matchtype codes */
2351
+ #define FKCONSTR_MATCH_FULL 'f'
2352
+ #define FKCONSTR_MATCH_PARTIAL 'p'
2353
+ #define FKCONSTR_MATCH_SIMPLE 's'
2354
+
2355
+ typedef struct Constraint
2356
+ {
2357
+ NodeTag type;
2358
+ ConstrType contype; /* see above */
2359
+
2360
+ /* Fields used for most/all constraint types: */
2361
+ char *conname; /* Constraint name, or NULL if unnamed */
2362
+ bool deferrable; /* DEFERRABLE? */
2363
+ bool initdeferred; /* INITIALLY DEFERRED? */
2364
+ int location; /* token location, or -1 if unknown */
2365
+
2366
+ /* Fields used for constraints with expressions (CHECK and DEFAULT): */
2367
+ bool is_no_inherit; /* is constraint non-inheritable? */
2368
+ Node *raw_expr; /* expr, as untransformed parse tree */
2369
+ char *cooked_expr; /* expr, as nodeToString representation */
2370
+ char generated_when; /* ALWAYS or BY DEFAULT */
2371
+
2372
+ /* Fields used for unique constraints (UNIQUE and PRIMARY KEY): */
2373
+ bool nulls_not_distinct; /* null treatment for UNIQUE constraints */
2374
+ List *keys; /* String nodes naming referenced key
2375
+ * column(s) */
2376
+ List *including; /* String nodes naming referenced nonkey
2377
+ * column(s) */
2378
+
2379
+ /* Fields used for EXCLUSION constraints: */
2380
+ List *exclusions; /* list of (IndexElem, operator name) pairs */
2381
+
2382
+ /* Fields used for index constraints (UNIQUE, PRIMARY KEY, EXCLUSION): */
2383
+ List *options; /* options from WITH clause */
2384
+ char *indexname; /* existing index to use; otherwise NULL */
2385
+ char *indexspace; /* index tablespace; NULL for default */
2386
+ bool reset_default_tblspc; /* reset default_tablespace prior to
2387
+ * creating the index */
2388
+ /* These could be, but currently are not, used for UNIQUE/PKEY: */
2389
+ char *access_method; /* index access method; NULL for default */
2390
+ Node *where_clause; /* partial index predicate */
2391
+
2392
+ /* Fields used for FOREIGN KEY constraints: */
2393
+ RangeVar *pktable; /* Primary key table */
2394
+ List *fk_attrs; /* Attributes of foreign key */
2395
+ List *pk_attrs; /* Corresponding attrs in PK table */
2396
+ char fk_matchtype; /* FULL, PARTIAL, SIMPLE */
2397
+ char fk_upd_action; /* ON UPDATE action */
2398
+ char fk_del_action; /* ON DELETE action */
2399
+ List *fk_del_set_cols; /* ON DELETE SET NULL/DEFAULT (col1, col2) */
2400
+ List *old_conpfeqop; /* pg_constraint.conpfeqop of my former self */
2401
+ Oid old_pktable_oid; /* pg_constraint.confrelid of my former
2402
+ * self */
2403
+
2404
+ /* Fields used for constraints that allow a NOT VALID specification */
2405
+ bool skip_validation; /* skip validation of existing rows? */
2406
+ bool initially_valid; /* mark the new constraint as valid? */
2407
+
2408
+ /*
2409
+ * For YugaByte LSM primary or unique key defined inline with the table
2410
+ * definition, we allow the key definition to include the sorting info
2411
+ * like "create table (... primary key (h hash, r1 asc, r2 desc))". We
2412
+ * save the IndexElem of the attributes in 'yb_index_params' to access the
2413
+ * full definition of the key attributes.
2414
+ */
2415
+ List *yb_index_params; /* IndexElem nodes of UNIQUE or PRIMARY
2416
+ * KEY constraint */
2417
+ } Constraint;
2418
+
2419
+ /* ----------
2420
+ * YugaByte split parameters in CreateStmt
2421
+ *
2422
+ * In YugaByte, tables are split into a certain number of tablets.
2423
+ * This normally happens automatically behind the scenes, but there is
2424
+ * a SPLIT extension that allows the user to specify the number of tablets
2425
+ * (in the case of a HASH-partitioned table) or explicit split points
2426
+ * (in the case of a range-partitioned table).
2427
+ * ----------
2428
+ */
2429
+
2430
+ typedef enum
2431
+ {
2432
+ NUM_TABLETS = 0,
2433
+ SPLIT_POINTS = 1
2434
+ } YbSplitType;
2435
+
2436
+ typedef struct YbOptSplit
2437
+ {
2438
+ NodeTag type;
2439
+
2440
+ YbSplitType split_type;
2441
+ int num_tablets;
2442
+ List *split_points;
2443
+ } YbOptSplit;
2444
+
2445
+ /* ----------------------
2446
+ * Create/Drop Profile Statements
2447
+ * ----------------------
2448
+ */
2449
+
2450
+ typedef struct YbCreateProfileStmt
2451
+ {
2452
+ NodeTag type;
2453
+ char *prfname;
2454
+ Integer *prffailedloginattempts;
2455
+ } YbCreateProfileStmt;
2456
+
2457
+ typedef struct YbDropProfileStmt
2458
+ {
2459
+ NodeTag type;
2460
+ char *prfname;
2461
+ bool missing_ok; /* skip error if missing? */
2462
+ } YbDropProfileStmt;
2463
+
2464
+ /* ----------------------
2465
+ * Create/Drop Tablegroup Statements
2466
+ * ----------------------
2467
+ */
2468
+
2469
+ typedef struct YbCreateTableGroupStmt
2470
+ {
2471
+ NodeTag type;
2472
+ char *tablegroupname;
2473
+ RoleSpec *owner;
2474
+ List *options;
2475
+ char *tablespacename;
2476
+ /*
2477
+ * Whether this tablegroup is created implicitly by YB
2478
+ * or created explicitly by users.
2479
+ */
2480
+ bool implicit;
2481
+ } YbCreateTableGroupStmt;
2482
+
2483
+ /* ----------------------
2484
+ * Create/Drop Table Space Statements
2485
+ * ----------------------
2486
+ */
2487
+
2488
+ typedef struct CreateTableSpaceStmt
2489
+ {
2490
+ NodeTag type;
2491
+ char *tablespacename;
2492
+ RoleSpec *owner;
2493
+ char *location;
2494
+ List *options;
2495
+ } CreateTableSpaceStmt;
2496
+
2497
+ typedef struct DropTableSpaceStmt
2498
+ {
2499
+ NodeTag type;
2500
+ char *tablespacename;
2501
+ bool missing_ok; /* skip error if missing? */
2502
+ } DropTableSpaceStmt;
2503
+
2504
+ typedef struct AlterTableSpaceOptionsStmt
2505
+ {
2506
+ NodeTag type;
2507
+ char *tablespacename;
2508
+ List *options;
2509
+ bool isReset;
2510
+ } AlterTableSpaceOptionsStmt;
2511
+
2512
+ typedef struct AlterTableMoveAllStmt
2513
+ {
2514
+ NodeTag type;
2515
+ char *orig_tablespacename;
2516
+ ObjectType objtype; /* Object type to move */
2517
+ List *roles; /* List of roles to move objects of */
2518
+ char *new_tablespacename;
2519
+ bool nowait;
2520
+ RangeVar *yb_relation;
2521
+ bool yb_cascade;
2522
+ } AlterTableMoveAllStmt;
2523
+
2524
+ /* ----------------------
2525
+ * Create/Alter Extension Statements
2526
+ * ----------------------
2527
+ */
2528
+
2529
+ typedef struct CreateExtensionStmt
2530
+ {
2531
+ NodeTag type;
2532
+ char *extname;
2533
+ bool if_not_exists; /* just do nothing if it already exists? */
2534
+ List *options; /* List of DefElem nodes */
2535
+ } CreateExtensionStmt;
2536
+
2537
+ /* Only used for ALTER EXTENSION UPDATE; later might need an action field */
2538
+ typedef struct AlterExtensionStmt
2539
+ {
2540
+ NodeTag type;
2541
+ char *extname;
2542
+ List *options; /* List of DefElem nodes */
2543
+ } AlterExtensionStmt;
2544
+
2545
+ typedef struct AlterExtensionContentsStmt
2546
+ {
2547
+ NodeTag type;
2548
+ char *extname; /* Extension's name */
2549
+ int action; /* +1 = add object, -1 = drop object */
2550
+ ObjectType objtype; /* Object's type */
2551
+ Node *object; /* Qualified name of the object */
2552
+ } AlterExtensionContentsStmt;
2553
+
2554
+ /* ----------------------
2555
+ * Create/Alter FOREIGN DATA WRAPPER Statements
2556
+ * ----------------------
2557
+ */
2558
+
2559
+ typedef struct CreateFdwStmt
2560
+ {
2561
+ NodeTag type;
2562
+ char *fdwname; /* foreign-data wrapper name */
2563
+ List *func_options; /* HANDLER/VALIDATOR options */
2564
+ List *options; /* generic options to FDW */
2565
+ } CreateFdwStmt;
2566
+
2567
+ typedef struct AlterFdwStmt
2568
+ {
2569
+ NodeTag type;
2570
+ char *fdwname; /* foreign-data wrapper name */
2571
+ List *func_options; /* HANDLER/VALIDATOR options */
2572
+ List *options; /* generic options to FDW */
2573
+ } AlterFdwStmt;
2574
+
2575
+ /* ----------------------
2576
+ * Create/Alter FOREIGN SERVER Statements
2577
+ * ----------------------
2578
+ */
2579
+
2580
+ typedef struct CreateForeignServerStmt
2581
+ {
2582
+ NodeTag type;
2583
+ char *servername; /* server name */
2584
+ char *servertype; /* optional server type */
2585
+ char *version; /* optional server version */
2586
+ char *fdwname; /* FDW name */
2587
+ bool if_not_exists; /* just do nothing if it already exists? */
2588
+ List *options; /* generic options to server */
2589
+ } CreateForeignServerStmt;
2590
+
2591
+ typedef struct AlterForeignServerStmt
2592
+ {
2593
+ NodeTag type;
2594
+ char *servername; /* server name */
2595
+ char *version; /* optional server version */
2596
+ List *options; /* generic options to server */
2597
+ bool has_version; /* version specified */
2598
+ } AlterForeignServerStmt;
2599
+
2600
+ /* ----------------------
2601
+ * Create FOREIGN TABLE Statement
2602
+ * ----------------------
2603
+ */
2604
+
2605
+ typedef struct CreateForeignTableStmt
2606
+ {
2607
+ CreateStmt base;
2608
+ char *servername;
2609
+ List *options;
2610
+ } CreateForeignTableStmt;
2611
+
2612
+ /* ----------------------
2613
+ * Create/Drop USER MAPPING Statements
2614
+ * ----------------------
2615
+ */
2616
+
2617
+ typedef struct CreateUserMappingStmt
2618
+ {
2619
+ NodeTag type;
2620
+ RoleSpec *user; /* user role */
2621
+ char *servername; /* server name */
2622
+ bool if_not_exists; /* just do nothing if it already exists? */
2623
+ List *options; /* generic options to server */
2624
+ } CreateUserMappingStmt;
2625
+
2626
+ typedef struct AlterUserMappingStmt
2627
+ {
2628
+ NodeTag type;
2629
+ RoleSpec *user; /* user role */
2630
+ char *servername; /* server name */
2631
+ List *options; /* generic options to server */
2632
+ } AlterUserMappingStmt;
2633
+
2634
+ typedef struct DropUserMappingStmt
2635
+ {
2636
+ NodeTag type;
2637
+ RoleSpec *user; /* user role */
2638
+ char *servername; /* server name */
2639
+ bool missing_ok; /* ignore missing mappings */
2640
+ } DropUserMappingStmt;
2641
+
2642
+ /* ----------------------
2643
+ * Import Foreign Schema Statement
2644
+ * ----------------------
2645
+ */
2646
+
2647
+ typedef enum ImportForeignSchemaType
2648
+ {
2649
+ FDW_IMPORT_SCHEMA_ALL, /* all relations wanted */
2650
+ FDW_IMPORT_SCHEMA_LIMIT_TO, /* include only listed tables in import */
2651
+ FDW_IMPORT_SCHEMA_EXCEPT /* exclude listed tables from import */
2652
+ } ImportForeignSchemaType;
2653
+
2654
+ typedef struct ImportForeignSchemaStmt
2655
+ {
2656
+ NodeTag type;
2657
+ char *server_name; /* FDW server name */
2658
+ char *remote_schema; /* remote schema name to query */
2659
+ char *local_schema; /* local schema to create objects in */
2660
+ ImportForeignSchemaType list_type; /* type of table list */
2661
+ List *table_list; /* List of RangeVar */
2662
+ List *options; /* list of options to pass to FDW */
2663
+ } ImportForeignSchemaStmt;
2664
+
2665
+ /*----------------------
2666
+ * Create POLICY Statement
2667
+ *----------------------
2668
+ */
2669
+ typedef struct CreatePolicyStmt
2670
+ {
2671
+ NodeTag type;
2672
+ char *policy_name; /* Policy's name */
2673
+ RangeVar *table; /* the table name the policy applies to */
2674
+ char *cmd_name; /* the command name the policy applies to */
2675
+ bool permissive; /* restrictive or permissive policy */
2676
+ List *roles; /* the roles associated with the policy */
2677
+ Node *qual; /* the policy's condition */
2678
+ Node *with_check; /* the policy's WITH CHECK condition. */
2679
+ } CreatePolicyStmt;
2680
+
2681
+ /*----------------------
2682
+ * Alter POLICY Statement
2683
+ *----------------------
2684
+ */
2685
+ typedef struct AlterPolicyStmt
2686
+ {
2687
+ NodeTag type;
2688
+ char *policy_name; /* Policy's name */
2689
+ RangeVar *table; /* the table name the policy applies to */
2690
+ List *roles; /* the roles associated with the policy */
2691
+ Node *qual; /* the policy's condition */
2692
+ Node *with_check; /* the policy's WITH CHECK condition. */
2693
+ } AlterPolicyStmt;
2694
+
2695
+ /*----------------------
2696
+ * Create ACCESS METHOD Statement
2697
+ *----------------------
2698
+ */
2699
+ typedef struct CreateAmStmt
2700
+ {
2701
+ NodeTag type;
2702
+ char *amname; /* access method name */
2703
+ List *handler_name; /* handler function name */
2704
+ char amtype; /* type of access method */
2705
+ } CreateAmStmt;
2706
+
2707
+ /* ----------------------
2708
+ * Create TRIGGER Statement
2709
+ * ----------------------
2710
+ */
2711
+ typedef struct CreateTrigStmt
2712
+ {
2713
+ NodeTag type;
2714
+ bool replace; /* replace trigger if already exists */
2715
+ bool isconstraint; /* This is a constraint trigger */
2716
+ char *trigname; /* TRIGGER's name */
2717
+ RangeVar *relation; /* relation trigger is on */
2718
+ List *funcname; /* qual. name of function to call */
2719
+ List *args; /* list of String or NIL */
2720
+ bool row; /* ROW/STATEMENT */
2721
+ /* timing uses the TRIGGER_TYPE bits defined in catalog/pg_trigger.h */
2722
+ int16 timing; /* BEFORE, AFTER, or INSTEAD */
2723
+ /* events uses the TRIGGER_TYPE bits defined in catalog/pg_trigger.h */
2724
+ int16 events; /* "OR" of INSERT/UPDATE/DELETE/TRUNCATE */
2725
+ List *columns; /* column names, or NIL for all columns */
2726
+ Node *whenClause; /* qual expression, or NULL if none */
2727
+ /* explicitly named transition data */
2728
+ List *transitionRels; /* TriggerTransition nodes, or NIL if none */
2729
+ /* The remaining fields are only used for constraint triggers */
2730
+ bool deferrable; /* [NOT] DEFERRABLE */
2731
+ bool initdeferred; /* INITIALLY {DEFERRED|IMMEDIATE} */
2732
+ RangeVar *constrrel; /* opposite relation, if RI trigger */
2733
+ } CreateTrigStmt;
2734
+
2735
+ /* ----------------------
2736
+ * Create EVENT TRIGGER Statement
2737
+ * ----------------------
2738
+ */
2739
+ typedef struct CreateEventTrigStmt
2740
+ {
2741
+ NodeTag type;
2742
+ char *trigname; /* TRIGGER's name */
2743
+ char *eventname; /* event's identifier */
2744
+ List *whenclause; /* list of DefElems indicating filtering */
2745
+ List *funcname; /* qual. name of function to call */
2746
+ } CreateEventTrigStmt;
2747
+
2748
+ /* ----------------------
2749
+ * Alter EVENT TRIGGER Statement
2750
+ * ----------------------
2751
+ */
2752
+ typedef struct AlterEventTrigStmt
2753
+ {
2754
+ NodeTag type;
2755
+ char *trigname; /* TRIGGER's name */
2756
+ char tgenabled; /* trigger's firing configuration WRT
2757
+ * session_replication_role */
2758
+ } AlterEventTrigStmt;
2759
+
2760
+ /* ----------------------
2761
+ * Create LANGUAGE Statements
2762
+ * ----------------------
2763
+ */
2764
+ typedef struct CreatePLangStmt
2765
+ {
2766
+ NodeTag type;
2767
+ bool replace; /* T => replace if already exists */
2768
+ char *plname; /* PL name */
2769
+ List *plhandler; /* PL call handler function (qual. name) */
2770
+ List *plinline; /* optional inline function (qual. name) */
2771
+ List *plvalidator; /* optional validator function (qual. name) */
2772
+ bool pltrusted; /* PL is trusted */
2773
+ } CreatePLangStmt;
2774
+
2775
+ /* ----------------------
2776
+ * Create/Alter/Drop Role Statements
2777
+ *
2778
+ * Note: these node types are also used for the backwards-compatible
2779
+ * Create/Alter/Drop User/Group statements. In the ALTER and DROP cases
2780
+ * there's really no need to distinguish what the original spelling was,
2781
+ * but for CREATE we mark the type because the defaults vary.
2782
+ * ----------------------
2783
+ */
2784
+ typedef enum RoleStmtType
2785
+ {
2786
+ ROLESTMT_ROLE,
2787
+ ROLESTMT_USER,
2788
+ ROLESTMT_GROUP
2789
+ } RoleStmtType;
2790
+
2791
+ typedef struct CreateRoleStmt
2792
+ {
2793
+ NodeTag type;
2794
+ RoleStmtType stmt_type; /* ROLE/USER/GROUP */
2795
+ char *role; /* role name */
2796
+ List *options; /* List of DefElem nodes */
2797
+ } CreateRoleStmt;
2798
+
2799
+ typedef struct AlterRoleStmt
2800
+ {
2801
+ NodeTag type;
2802
+ RoleSpec *role; /* role */
2803
+ List *options; /* List of DefElem nodes */
2804
+ int action; /* +1 = add members, -1 = drop members */
2805
+ } AlterRoleStmt;
2806
+
2807
+ typedef struct AlterRoleSetStmt
2808
+ {
2809
+ NodeTag type;
2810
+ RoleSpec *role; /* role */
2811
+ char *database; /* database name, or NULL */
2812
+ VariableSetStmt *setstmt; /* SET or RESET subcommand */
2813
+ } AlterRoleSetStmt;
2814
+
2815
+ typedef struct DropRoleStmt
2816
+ {
2817
+ NodeTag type;
2818
+ List *roles; /* List of roles to remove */
2819
+ bool missing_ok; /* skip error if a role is missing? */
2820
+ } DropRoleStmt;
2821
+
2822
+ /* ----------------------
2823
+ * {Create|Alter} SEQUENCE Statement
2824
+ * ----------------------
2825
+ */
2826
+
2827
+ typedef struct CreateSeqStmt
2828
+ {
2829
+ NodeTag type;
2830
+ RangeVar *sequence; /* the sequence to create */
2831
+ List *options;
2832
+ Oid ownerId; /* ID of owner, or InvalidOid for default */
2833
+ bool for_identity;
2834
+ bool if_not_exists; /* just do nothing if it already exists? */
2835
+ } CreateSeqStmt;
2836
+
2837
+ typedef struct AlterSeqStmt
2838
+ {
2839
+ NodeTag type;
2840
+ RangeVar *sequence; /* the sequence to alter */
2841
+ List *options;
2842
+ bool for_identity;
2843
+ bool missing_ok; /* skip error if a role is missing? */
2844
+ } AlterSeqStmt;
2845
+
2846
+ /* ----------------------
2847
+ * Create {Aggregate|Operator|Type} Statement
2848
+ * ----------------------
2849
+ */
2850
+ typedef struct DefineStmt
2851
+ {
2852
+ NodeTag type;
2853
+ ObjectType kind; /* aggregate, operator, type */
2854
+ bool oldstyle; /* hack to signal old CREATE AGG syntax */
2855
+ List *defnames; /* qualified name (list of String) */
2856
+ List *args; /* a list of TypeName (if needed) */
2857
+ List *definition; /* a list of DefElem */
2858
+ bool if_not_exists; /* just do nothing if it already exists? */
2859
+ bool replace; /* replace if already exists? */
2860
+ } DefineStmt;
2861
+
2862
+ /* ----------------------
2863
+ * Create Domain Statement
2864
+ * ----------------------
2865
+ */
2866
+ typedef struct CreateDomainStmt
2867
+ {
2868
+ NodeTag type;
2869
+ List *domainname; /* qualified name (list of String) */
2870
+ TypeName *typeName; /* the base type */
2871
+ CollateClause *collClause; /* untransformed COLLATE spec, if any */
2872
+ List *constraints; /* constraints (list of Constraint nodes) */
2873
+ } CreateDomainStmt;
2874
+
2875
+ /* ----------------------
2876
+ * Create Operator Class Statement
2877
+ * ----------------------
2878
+ */
2879
+ typedef struct CreateOpClassStmt
2880
+ {
2881
+ NodeTag type;
2882
+ List *opclassname; /* qualified name (list of String) */
2883
+ List *opfamilyname; /* qualified name (ditto); NIL if omitted */
2884
+ char *amname; /* name of index AM opclass is for */
2885
+ TypeName *datatype; /* datatype of indexed column */
2886
+ List *items; /* List of CreateOpClassItem nodes */
2887
+ bool isDefault; /* Should be marked as default for type? */
2888
+ } CreateOpClassStmt;
2889
+
2890
+ #define OPCLASS_ITEM_OPERATOR 1
2891
+ #define OPCLASS_ITEM_FUNCTION 2
2892
+ #define OPCLASS_ITEM_STORAGETYPE 3
2893
+
2894
+ typedef struct CreateOpClassItem
2895
+ {
2896
+ NodeTag type;
2897
+ int itemtype; /* see codes above */
2898
+ ObjectWithArgs *name; /* operator or function name and args */
2899
+ int number; /* strategy num or support proc num */
2900
+ List *order_family; /* only used for ordering operators */
2901
+ List *class_args; /* amproclefttype/amprocrighttype or
2902
+ * amoplefttype/amoprighttype */
2903
+ /* fields used for a storagetype item: */
2904
+ TypeName *storedtype; /* datatype stored in index */
2905
+ } CreateOpClassItem;
2906
+
2907
+ /* ----------------------
2908
+ * Create Operator Family Statement
2909
+ * ----------------------
2910
+ */
2911
+ typedef struct CreateOpFamilyStmt
2912
+ {
2913
+ NodeTag type;
2914
+ List *opfamilyname; /* qualified name (list of String) */
2915
+ char *amname; /* name of index AM opfamily is for */
2916
+ } CreateOpFamilyStmt;
2917
+
2918
+ /* ----------------------
2919
+ * Alter Operator Family Statement
2920
+ * ----------------------
2921
+ */
2922
+ typedef struct AlterOpFamilyStmt
2923
+ {
2924
+ NodeTag type;
2925
+ List *opfamilyname; /* qualified name (list of String) */
2926
+ char *amname; /* name of index AM opfamily is for */
2927
+ bool isDrop; /* ADD or DROP the items? */
2928
+ List *items; /* List of CreateOpClassItem nodes */
2929
+ } AlterOpFamilyStmt;
2930
+
2931
+ /* ----------------------
2932
+ * Drop Table|Sequence|View|Index|Type|Domain|Conversion|Schema Statement
2933
+ * ----------------------
2934
+ */
2935
+
2936
+ typedef struct DropStmt
2937
+ {
2938
+ NodeTag type;
2939
+ List *objects; /* list of names */
2940
+ ObjectType removeType; /* object type */
2941
+ DropBehavior behavior; /* RESTRICT or CASCADE behavior */
2942
+ bool missing_ok; /* skip error if object is missing? */
2943
+ bool concurrent; /* drop index concurrently? */
2944
+ } DropStmt;
2945
+
2946
+ /* ----------------------
2947
+ * Truncate Table Statement
2948
+ * ----------------------
2949
+ */
2950
+ typedef struct TruncateStmt
2951
+ {
2952
+ NodeTag type;
2953
+ List *relations; /* relations (RangeVars) to be truncated */
2954
+ bool restart_seqs; /* restart owned sequences? */
2955
+ DropBehavior behavior; /* RESTRICT or CASCADE behavior */
2956
+ } TruncateStmt;
2957
+
2958
+ /* ----------------------
2959
+ * Comment On Statement
2960
+ * ----------------------
2961
+ */
2962
+ typedef struct CommentStmt
2963
+ {
2964
+ NodeTag type;
2965
+ ObjectType objtype; /* Object's type */
2966
+ Node *object; /* Qualified name of the object */
2967
+ char *comment; /* Comment to insert, or NULL to remove */
2968
+ } CommentStmt;
2969
+
2970
+ /* ----------------------
2971
+ * SECURITY LABEL Statement
2972
+ * ----------------------
2973
+ */
2974
+ typedef struct SecLabelStmt
2975
+ {
2976
+ NodeTag type;
2977
+ ObjectType objtype; /* Object's type */
2978
+ Node *object; /* Qualified name of the object */
2979
+ char *provider; /* Label provider (or NULL) */
2980
+ char *label; /* New security label to be assigned */
2981
+ } SecLabelStmt;
2982
+
2983
+ /* ----------------------
2984
+ * Declare Cursor Statement
2985
+ *
2986
+ * The "query" field is initially a raw parse tree, and is converted to a
2987
+ * Query node during parse analysis. Note that rewriting and planning
2988
+ * of the query are always postponed until execution.
2989
+ * ----------------------
2990
+ */
2991
+ #define CURSOR_OPT_BINARY 0x0001 /* BINARY */
2992
+ #define CURSOR_OPT_SCROLL 0x0002 /* SCROLL explicitly given */
2993
+ #define CURSOR_OPT_NO_SCROLL 0x0004 /* NO SCROLL explicitly given */
2994
+ #define CURSOR_OPT_INSENSITIVE 0x0008 /* INSENSITIVE */
2995
+ #define CURSOR_OPT_ASENSITIVE 0x0010 /* ASENSITIVE */
2996
+ #define CURSOR_OPT_HOLD 0x0020 /* WITH HOLD */
2997
+ /* these planner-control flags do not correspond to any SQL grammar: */
2998
+ #define CURSOR_OPT_FAST_PLAN 0x0100 /* prefer fast-start plan */
2999
+ #define CURSOR_OPT_GENERIC_PLAN 0x0200 /* force use of generic plan */
3000
+ #define CURSOR_OPT_CUSTOM_PLAN 0x0400 /* force use of custom plan */
3001
+ #define CURSOR_OPT_PARALLEL_OK 0x0800 /* parallel mode OK */
3002
+
3003
+ typedef struct DeclareCursorStmt
3004
+ {
3005
+ NodeTag type;
3006
+ char *portalname; /* name of the portal (cursor) */
3007
+ int options; /* bitmask of options (see above) */
3008
+ Node *query; /* the query (see comments above) */
3009
+ } DeclareCursorStmt;
3010
+
3011
+ /* ----------------------
3012
+ * Close Portal Statement
3013
+ * ----------------------
3014
+ */
3015
+ typedef struct ClosePortalStmt
3016
+ {
3017
+ NodeTag type;
3018
+ char *portalname; /* name of the portal (cursor) */
3019
+ /* NULL means CLOSE ALL */
3020
+ } ClosePortalStmt;
3021
+
3022
+ /* ----------------------
3023
+ * Fetch Statement (also Move)
3024
+ * ----------------------
3025
+ */
3026
+ typedef enum FetchDirection
3027
+ {
3028
+ /* for these, howMany is how many rows to fetch; FETCH_ALL means ALL */
3029
+ FETCH_FORWARD,
3030
+ FETCH_BACKWARD,
3031
+ /* for these, howMany indicates a position; only one row is fetched */
3032
+ FETCH_ABSOLUTE,
3033
+ FETCH_RELATIVE
3034
+ } FetchDirection;
3035
+
3036
+ #define FETCH_ALL LONG_MAX
3037
+
3038
+ typedef struct FetchStmt
3039
+ {
3040
+ NodeTag type;
3041
+ FetchDirection direction; /* see above */
3042
+ long howMany; /* number of rows, or position argument */
3043
+ char *portalname; /* name of portal (cursor) */
3044
+ bool ismove; /* true if MOVE */
3045
+ } FetchStmt;
3046
+
3047
+ /* ----------------------
3048
+ * Create Index Statement
3049
+ *
3050
+ * This represents creation of an index and/or an associated constraint.
3051
+ * If isconstraint is true, we should create a pg_constraint entry along
3052
+ * with the index. But if indexOid isn't InvalidOid, we are not creating an
3053
+ * index, just a UNIQUE/PKEY constraint using an existing index. isconstraint
3054
+ * must always be true in this case, and the fields describing the index
3055
+ * properties are empty.
3056
+ * ----------------------
3057
+ */
3058
+ typedef struct IndexStmt
3059
+ {
3060
+ NodeTag type;
3061
+ char *idxname; /* name of new index, or NULL for default */
3062
+ RangeVar *relation; /* relation to build index on */
3063
+ char *accessMethod; /* name of access method (eg. btree) */
3064
+ char *tableSpace; /* tablespace, or NULL for default */
3065
+ List *indexParams; /* columns to index: a list of IndexElem */
3066
+ List *indexIncludingParams; /* additional columns to index: a list
3067
+ * of IndexElem */
3068
+ List *options; /* WITH clause options: a list of DefElem */
3069
+ Node *whereClause; /* qualification (partial-index predicate) */
3070
+ List *excludeOpNames; /* exclusion operator names, or NIL if none */
3071
+ char *idxcomment; /* comment to apply to index, or NULL */
3072
+ Oid indexOid; /* OID of an existing index, if any */
3073
+ Oid oldNode; /* relfilenode of existing storage, if any */
3074
+ SubTransactionId oldCreateSubid; /* rd_createSubid of oldNode */
3075
+ SubTransactionId oldFirstRelfilenodeSubid; /* rd_firstRelfilenodeSubid of
3076
+ * oldNode */
3077
+ bool unique; /* is index unique? */
3078
+ bool nulls_not_distinct; /* null treatment for UNIQUE constraints */
3079
+ bool primary; /* is index a primary key? */
3080
+ bool isconstraint; /* is it for a pkey/unique constraint? */
3081
+ bool deferrable; /* is the constraint DEFERRABLE? */
3082
+ bool initdeferred; /* is the constraint INITIALLY DEFERRED? */
3083
+ bool transformed; /* true when transformIndexStmt is finished */
3084
+ YbConcurrencyContext concurrent; /* is this a concurrent index build? */
3085
+ bool if_not_exists; /* just do nothing if index already exists? */
3086
+ bool reset_default_tblspc; /* reset default_tablespace prior to
3087
+ * executing */
3088
+
3089
+ /* YB */
3090
+ YbOptSplit *split_options; /* SPLIT statement options */
3091
+ } IndexStmt;
3092
+
3093
+ /* ----------------------
3094
+ * Create Statistics Statement
3095
+ * ----------------------
3096
+ */
3097
+ typedef struct CreateStatsStmt
3098
+ {
3099
+ NodeTag type;
3100
+ List *defnames; /* qualified name (list of String) */
3101
+ List *stat_types; /* stat types (list of String) */
3102
+ List *exprs; /* expressions to build statistics on */
3103
+ List *relations; /* rels to build stats on (list of RangeVar) */
3104
+ char *stxcomment; /* comment to apply to stats, or NULL */
3105
+ bool transformed; /* true when transformStatsStmt is finished */
3106
+ bool if_not_exists; /* do nothing if stats name already exists */
3107
+ } CreateStatsStmt;
3108
+
3109
+ /*
3110
+ * StatsElem - statistics parameters (used in CREATE STATISTICS)
3111
+ *
3112
+ * For a plain attribute, 'name' is the name of the referenced table column
3113
+ * and 'expr' is NULL. For an expression, 'name' is NULL and 'expr' is the
3114
+ * expression tree.
3115
+ */
3116
+ typedef struct StatsElem
3117
+ {
3118
+ NodeTag type;
3119
+ char *name; /* name of attribute to index, or NULL */
3120
+ Node *expr; /* expression to index, or NULL */
3121
+ } StatsElem;
3122
+
3123
+
3124
+ /* ----------------------
3125
+ * Alter Statistics Statement
3126
+ * ----------------------
3127
+ */
3128
+ typedef struct AlterStatsStmt
3129
+ {
3130
+ NodeTag type;
3131
+ List *defnames; /* qualified name (list of String) */
3132
+ int stxstattarget; /* statistics target */
3133
+ bool missing_ok; /* skip error if statistics object is missing */
3134
+ } AlterStatsStmt;
3135
+
3136
+ /* ----------------------
3137
+ * Create Function Statement
3138
+ * ----------------------
3139
+ */
3140
+ typedef struct CreateFunctionStmt
3141
+ {
3142
+ NodeTag type;
3143
+ bool is_procedure; /* it's really CREATE PROCEDURE */
3144
+ bool replace; /* T => replace if already exists */
3145
+ List *funcname; /* qualified name of function to create */
3146
+ List *parameters; /* a list of FunctionParameter */
3147
+ TypeName *returnType; /* the return type */
3148
+ List *options; /* a list of DefElem */
3149
+ Node *sql_body;
3150
+ } CreateFunctionStmt;
3151
+
3152
+ typedef enum FunctionParameterMode
3153
+ {
3154
+ /* the assigned enum values appear in pg_proc, don't change 'em! */
3155
+ FUNC_PARAM_IN = 'i', /* input only */
3156
+ FUNC_PARAM_OUT = 'o', /* output only */
3157
+ FUNC_PARAM_INOUT = 'b', /* both */
3158
+ FUNC_PARAM_VARIADIC = 'v', /* variadic (always input) */
3159
+ FUNC_PARAM_TABLE = 't', /* table function output column */
3160
+ /* this is not used in pg_proc: */
3161
+ FUNC_PARAM_DEFAULT = 'd' /* default; effectively same as IN */
3162
+ } FunctionParameterMode;
3163
+
3164
+ typedef struct FunctionParameter
3165
+ {
3166
+ NodeTag type;
3167
+ char *name; /* parameter name, or NULL if not given */
3168
+ TypeName *argType; /* TypeName for parameter type */
3169
+ FunctionParameterMode mode; /* IN/OUT/etc */
3170
+ Node *defexpr; /* raw default expr, or NULL if not given */
3171
+ } FunctionParameter;
3172
+
3173
+ typedef struct AlterFunctionStmt
3174
+ {
3175
+ NodeTag type;
3176
+ ObjectType objtype;
3177
+ ObjectWithArgs *func; /* name and args of function */
3178
+ List *actions; /* list of DefElem */
3179
+ } AlterFunctionStmt;
3180
+
3181
+ /* ----------------------
3182
+ * DO Statement
3183
+ *
3184
+ * DoStmt is the raw parser output, InlineCodeBlock is the execution-time API
3185
+ * ----------------------
3186
+ */
3187
+ typedef struct DoStmt
3188
+ {
3189
+ NodeTag type;
3190
+ List *args; /* List of DefElem nodes */
3191
+ } DoStmt;
3192
+
3193
+ typedef struct InlineCodeBlock
3194
+ {
3195
+ NodeTag type;
3196
+ char *source_text; /* source text of anonymous code block */
3197
+ Oid langOid; /* OID of selected language */
3198
+ bool langIsTrusted; /* trusted property of the language */
3199
+ bool atomic; /* atomic execution context */
3200
+ } InlineCodeBlock;
3201
+
3202
+ /* ----------------------
3203
+ * CALL statement
3204
+ *
3205
+ * OUT-mode arguments are removed from the transformed funcexpr. The outargs
3206
+ * list contains copies of the expressions for all output arguments, in the
3207
+ * order of the procedure's declared arguments. (outargs is never evaluated,
3208
+ * but is useful to the caller as a reference for what to assign to.)
3209
+ * ----------------------
3210
+ */
3211
+ typedef struct CallStmt
3212
+ {
3213
+ NodeTag type;
3214
+ FuncCall *funccall; /* from the parser */
3215
+ FuncExpr *funcexpr; /* transformed call, with only input args */
3216
+ List *outargs; /* transformed output-argument expressions */
3217
+ } CallStmt;
3218
+
3219
+ typedef struct CallContext
3220
+ {
3221
+ NodeTag type;
3222
+ bool atomic;
3223
+ } CallContext;
3224
+
3225
+ /* ----------------------
3226
+ * Alter Object Rename Statement
3227
+ * ----------------------
3228
+ */
3229
+ typedef struct RenameStmt
3230
+ {
3231
+ NodeTag type;
3232
+ ObjectType renameType; /* OBJECT_TABLE, OBJECT_COLUMN, etc */
3233
+ ObjectType relationType; /* if column name, associated relation type */
3234
+ RangeVar *relation; /* in case it's a table */
3235
+ Node *object; /* in case it's some other object */
3236
+ char *subname; /* name of contained object (column, rule,
3237
+ * trigger, etc) */
3238
+ char *newname; /* the new name */
3239
+ DropBehavior behavior; /* RESTRICT or CASCADE behavior */
3240
+ bool missing_ok; /* skip error if missing? */
3241
+ } RenameStmt;
3242
+
3243
+ /* ----------------------
3244
+ * ALTER object DEPENDS ON EXTENSION extname
3245
+ * ----------------------
3246
+ */
3247
+ typedef struct AlterObjectDependsStmt
3248
+ {
3249
+ NodeTag type;
3250
+ ObjectType objectType; /* OBJECT_FUNCTION, OBJECT_TRIGGER, etc */
3251
+ RangeVar *relation; /* in case a table is involved */
3252
+ Node *object; /* name of the object */
3253
+ String *extname; /* extension name */
3254
+ bool remove; /* set true to remove dep rather than add */
3255
+ } AlterObjectDependsStmt;
3256
+
3257
+ /* ----------------------
3258
+ * ALTER object SET SCHEMA Statement
3259
+ * ----------------------
3260
+ */
3261
+ typedef struct AlterObjectSchemaStmt
3262
+ {
3263
+ NodeTag type;
3264
+ ObjectType objectType; /* OBJECT_TABLE, OBJECT_TYPE, etc */
3265
+ RangeVar *relation; /* in case it's a table */
3266
+ Node *object; /* in case it's some other object */
3267
+ char *newschema; /* the new schema */
3268
+ bool missing_ok; /* skip error if missing? */
3269
+ } AlterObjectSchemaStmt;
3270
+
3271
+ /* ----------------------
3272
+ * Alter Object Owner Statement
3273
+ * ----------------------
3274
+ */
3275
+ typedef struct AlterOwnerStmt
3276
+ {
3277
+ NodeTag type;
3278
+ ObjectType objectType; /* OBJECT_TABLE, OBJECT_TYPE, etc */
3279
+ RangeVar *relation; /* in case it's a table */
3280
+ Node *object; /* in case it's some other object */
3281
+ RoleSpec *newowner; /* the new owner */
3282
+ } AlterOwnerStmt;
3283
+
3284
+ /* ----------------------
3285
+ * Alter Operator Set ( this-n-that )
3286
+ * ----------------------
3287
+ */
3288
+ typedef struct AlterOperatorStmt
3289
+ {
3290
+ NodeTag type;
3291
+ ObjectWithArgs *opername; /* operator name and argument types */
3292
+ List *options; /* List of DefElem nodes */
3293
+ } AlterOperatorStmt;
3294
+
3295
+ /* ------------------------
3296
+ * Alter Type Set ( this-n-that )
3297
+ * ------------------------
3298
+ */
3299
+ typedef struct AlterTypeStmt
3300
+ {
3301
+ NodeTag type;
3302
+ List *typeName; /* type name (possibly qualified) */
3303
+ List *options; /* List of DefElem nodes */
3304
+ } AlterTypeStmt;
3305
+
3306
+ /* ----------------------
3307
+ * Create Rule Statement
3308
+ * ----------------------
3309
+ */
3310
+ typedef struct RuleStmt
3311
+ {
3312
+ NodeTag type;
3313
+ RangeVar *relation; /* relation the rule is for */
3314
+ char *rulename; /* name of the rule */
3315
+ Node *whereClause; /* qualifications */
3316
+ CmdType event; /* SELECT, INSERT, etc */
3317
+ bool instead; /* is a 'do instead'? */
3318
+ List *actions; /* the action statements */
3319
+ bool replace; /* OR REPLACE */
3320
+ } RuleStmt;
3321
+
3322
+ /* ----------------------
3323
+ * Notify Statement
3324
+ * ----------------------
3325
+ */
3326
+ typedef struct NotifyStmt
3327
+ {
3328
+ NodeTag type;
3329
+ char *conditionname; /* condition name to notify */
3330
+ char *payload; /* the payload string, or NULL if none */
3331
+ } NotifyStmt;
3332
+
3333
+ /* ----------------------
3334
+ * Listen Statement
3335
+ * ----------------------
3336
+ */
3337
+ typedef struct ListenStmt
3338
+ {
3339
+ NodeTag type;
3340
+ char *conditionname; /* condition name to listen on */
3341
+ } ListenStmt;
3342
+
3343
+ /* ----------------------
3344
+ * Unlisten Statement
3345
+ * ----------------------
3346
+ */
3347
+ typedef struct UnlistenStmt
3348
+ {
3349
+ NodeTag type;
3350
+ char *conditionname; /* name to unlisten on, or NULL for all */
3351
+ } UnlistenStmt;
3352
+
3353
+ /* ----------------------
3354
+ * {Begin|Commit|Rollback} Transaction Statement
3355
+ * ----------------------
3356
+ */
3357
+ typedef enum TransactionStmtKind
3358
+ {
3359
+ TRANS_STMT_BEGIN,
3360
+ TRANS_STMT_START, /* semantically identical to BEGIN */
3361
+ TRANS_STMT_COMMIT,
3362
+ TRANS_STMT_ROLLBACK,
3363
+ TRANS_STMT_SAVEPOINT,
3364
+ TRANS_STMT_RELEASE,
3365
+ TRANS_STMT_ROLLBACK_TO,
3366
+ TRANS_STMT_PREPARE,
3367
+ TRANS_STMT_COMMIT_PREPARED,
3368
+ TRANS_STMT_ROLLBACK_PREPARED
3369
+ } TransactionStmtKind;
3370
+
3371
+ typedef struct TransactionStmt
3372
+ {
3373
+ NodeTag type;
3374
+ TransactionStmtKind kind; /* see above */
3375
+ List *options; /* for BEGIN/START commands */
3376
+ char *savepoint_name; /* for savepoint commands */
3377
+ char *gid; /* for two-phase-commit related commands */
3378
+ bool chain; /* AND CHAIN option */
3379
+ } TransactionStmt;
3380
+
3381
+ /* ----------------------
3382
+ * Create Type Statement, composite types
3383
+ * ----------------------
3384
+ */
3385
+ typedef struct CompositeTypeStmt
3386
+ {
3387
+ NodeTag type;
3388
+ RangeVar *typevar; /* the composite type to be created */
3389
+ List *coldeflist; /* list of ColumnDef nodes */
3390
+ } CompositeTypeStmt;
3391
+
3392
+ /* ----------------------
3393
+ * Create Type Statement, enum types
3394
+ * ----------------------
3395
+ */
3396
+ typedef struct CreateEnumStmt
3397
+ {
3398
+ NodeTag type;
3399
+ List *typeName; /* qualified name (list of String) */
3400
+ List *vals; /* enum values (list of String) */
3401
+ } CreateEnumStmt;
3402
+
3403
+ /* ----------------------
3404
+ * Create Type Statement, range types
3405
+ * ----------------------
3406
+ */
3407
+ typedef struct CreateRangeStmt
3408
+ {
3409
+ NodeTag type;
3410
+ List *typeName; /* qualified name (list of String) */
3411
+ List *params; /* range parameters (list of DefElem) */
3412
+ } CreateRangeStmt;
3413
+
3414
+ /* ----------------------
3415
+ * Alter Type Statement, enum types
3416
+ * ----------------------
3417
+ */
3418
+ typedef struct AlterEnumStmt
3419
+ {
3420
+ NodeTag type;
3421
+ List *typeName; /* qualified name (list of String) */
3422
+ char *oldVal; /* old enum value's name, if renaming */
3423
+ char *newVal; /* new enum value's name */
3424
+ char *newValNeighbor; /* neighboring enum value, if specified */
3425
+ bool newValIsAfter; /* place new enum value after neighbor? */
3426
+ bool skipIfNewValExists; /* no error if new already exists? */
3427
+ } AlterEnumStmt;
3428
+
3429
+ /* ----------------------
3430
+ * Create View Statement
3431
+ * ----------------------
3432
+ */
3433
+ typedef enum ViewCheckOption
3434
+ {
3435
+ NO_CHECK_OPTION,
3436
+ LOCAL_CHECK_OPTION,
3437
+ CASCADED_CHECK_OPTION
3438
+ } ViewCheckOption;
3439
+
3440
+ typedef struct ViewStmt
3441
+ {
3442
+ NodeTag type;
3443
+ RangeVar *view; /* the view to be created */
3444
+ List *aliases; /* target column names */
3445
+ Node *query; /* the SELECT query (as a raw parse tree) */
3446
+ bool replace; /* replace an existing view? */
3447
+ List *options; /* options from WITH clause */
3448
+ ViewCheckOption withCheckOption; /* WITH CHECK OPTION */
3449
+ } ViewStmt;
3450
+
3451
+ /* ----------------------
3452
+ * Load Statement
3453
+ * ----------------------
3454
+ */
3455
+ typedef struct LoadStmt
3456
+ {
3457
+ NodeTag type;
3458
+ char *filename; /* file to load */
3459
+ } LoadStmt;
3460
+
3461
+ /* ----------------------
3462
+ * Createdb Statement
3463
+ * ----------------------
3464
+ */
3465
+ typedef struct CreatedbStmt
3466
+ {
3467
+ NodeTag type;
3468
+ char *dbname; /* name of database to create */
3469
+ List *options; /* List of DefElem nodes */
3470
+ } CreatedbStmt;
3471
+
3472
+ /* ----------------------
3473
+ * Alter Database
3474
+ * ----------------------
3475
+ */
3476
+ typedef struct AlterDatabaseStmt
3477
+ {
3478
+ NodeTag type;
3479
+ char *dbname; /* name of database to alter */
3480
+ List *options; /* List of DefElem nodes */
3481
+ } AlterDatabaseStmt;
3482
+
3483
+ typedef struct AlterDatabaseRefreshCollStmt
3484
+ {
3485
+ NodeTag type;
3486
+ char *dbname;
3487
+ } AlterDatabaseRefreshCollStmt;
3488
+
3489
+ typedef struct AlterDatabaseSetStmt
3490
+ {
3491
+ NodeTag type;
3492
+ char *dbname; /* database name */
3493
+ VariableSetStmt *setstmt; /* SET or RESET subcommand */
3494
+ } AlterDatabaseSetStmt;
3495
+
3496
+ /* ----------------------
3497
+ * Dropdb Statement
3498
+ * ----------------------
3499
+ */
3500
+ typedef struct DropdbStmt
3501
+ {
3502
+ NodeTag type;
3503
+ char *dbname; /* database to drop */
3504
+ bool missing_ok; /* skip error if db is missing? */
3505
+ List *options; /* currently only FORCE is supported */
3506
+ } DropdbStmt;
3507
+
3508
+ /* ----------------------
3509
+ * Alter System Statement
3510
+ * ----------------------
3511
+ */
3512
+ typedef struct AlterSystemStmt
3513
+ {
3514
+ NodeTag type;
3515
+ VariableSetStmt *setstmt; /* SET subcommand */
3516
+ } AlterSystemStmt;
3517
+
3518
+ /* ----------------------
3519
+ * Cluster Statement (support pbrown's cluster index implementation)
3520
+ * ----------------------
3521
+ */
3522
+ typedef struct ClusterStmt
3523
+ {
3524
+ NodeTag type;
3525
+ RangeVar *relation; /* relation being indexed, or NULL if all */
3526
+ char *indexname; /* original index defined */
3527
+ List *params; /* list of DefElem nodes */
3528
+ } ClusterStmt;
3529
+
3530
+ /* ----------------------
3531
+ * Vacuum and Analyze Statements
3532
+ *
3533
+ * Even though these are nominally two statements, it's convenient to use
3534
+ * just one node type for both.
3535
+ * ----------------------
3536
+ */
3537
+ typedef struct VacuumStmt
3538
+ {
3539
+ NodeTag type;
3540
+ List *options; /* list of DefElem nodes */
3541
+ List *rels; /* list of VacuumRelation, or NIL for all */
3542
+ bool is_vacuumcmd; /* true for VACUUM, false for ANALYZE */
3543
+ } VacuumStmt;
3544
+
3545
+ /*
3546
+ * Info about a single target table of VACUUM/ANALYZE.
3547
+ *
3548
+ * If the OID field is set, it always identifies the table to process.
3549
+ * Then the relation field can be NULL; if it isn't, it's used only to report
3550
+ * failure to open/lock the relation.
3551
+ */
3552
+ typedef struct VacuumRelation
3553
+ {
3554
+ NodeTag type;
3555
+ RangeVar *relation; /* table name to process, or NULL */
3556
+ Oid oid; /* table's OID; InvalidOid if not looked up */
3557
+ List *va_cols; /* list of column names, or NIL for all */
3558
+ } VacuumRelation;
3559
+
3560
+ /* ----------------------
3561
+ * Explain Statement
3562
+ *
3563
+ * The "query" field is initially a raw parse tree, and is converted to a
3564
+ * Query node during parse analysis. Note that rewriting and planning
3565
+ * of the query are always postponed until execution.
3566
+ * ----------------------
3567
+ */
3568
+ typedef struct ExplainStmt
3569
+ {
3570
+ NodeTag type;
3571
+ Node *query; /* the query (see comments above) */
3572
+ List *options; /* list of DefElem nodes */
3573
+ } ExplainStmt;
3574
+
3575
+ /* ----------------------
3576
+ * CREATE TABLE AS Statement (a/k/a SELECT INTO)
3577
+ *
3578
+ * A query written as CREATE TABLE AS will produce this node type natively.
3579
+ * A query written as SELECT ... INTO will be transformed to this form during
3580
+ * parse analysis.
3581
+ * A query written as CREATE MATERIALIZED view will produce this node type,
3582
+ * during parse analysis, since it needs all the same data.
3583
+ *
3584
+ * The "query" field is handled similarly to EXPLAIN, though note that it
3585
+ * can be a SELECT or an EXECUTE, but not other DML statements.
3586
+ * ----------------------
3587
+ */
3588
+ typedef struct CreateTableAsStmt
3589
+ {
3590
+ NodeTag type;
3591
+ Node *query; /* the query (see comments above) */
3592
+ IntoClause *into; /* destination table */
3593
+ ObjectType objtype; /* OBJECT_TABLE or OBJECT_MATVIEW */
3594
+ bool is_select_into; /* it was written as SELECT INTO */
3595
+ bool if_not_exists; /* just do nothing if it already exists? */
3596
+ } CreateTableAsStmt;
3597
+
3598
+ /* ----------------------
3599
+ * REFRESH MATERIALIZED VIEW Statement
3600
+ * ----------------------
3601
+ */
3602
+ typedef struct RefreshMatViewStmt
3603
+ {
3604
+ NodeTag type;
3605
+ bool concurrent; /* allow concurrent access? */
3606
+ bool skipData; /* true for WITH NO DATA */
3607
+ RangeVar *relation; /* relation to insert into */
3608
+ } RefreshMatViewStmt;
3609
+
3610
+ /* ----------------------
3611
+ * Checkpoint Statement
3612
+ * ----------------------
3613
+ */
3614
+ typedef struct CheckPointStmt
3615
+ {
3616
+ NodeTag type;
3617
+ } CheckPointStmt;
3618
+
3619
+ /* ----------------------
3620
+ * Discard Statement
3621
+ * ----------------------
3622
+ */
3623
+
3624
+ typedef enum DiscardMode
3625
+ {
3626
+ DISCARD_ALL,
3627
+ DISCARD_PLANS,
3628
+ DISCARD_SEQUENCES,
3629
+ DISCARD_TEMP
3630
+ } DiscardMode;
3631
+
3632
+ typedef struct DiscardStmt
3633
+ {
3634
+ NodeTag type;
3635
+ DiscardMode target;
3636
+ } DiscardStmt;
3637
+
3638
+ /* ----------------------
3639
+ * LOCK Statement
3640
+ * ----------------------
3641
+ */
3642
+ typedef struct LockStmt
3643
+ {
3644
+ NodeTag type;
3645
+ List *relations; /* relations to lock */
3646
+ int mode; /* lock mode */
3647
+ bool nowait; /* no wait mode */
3648
+ } LockStmt;
3649
+
3650
+ /* ----------------------
3651
+ * SET CONSTRAINTS Statement
3652
+ * ----------------------
3653
+ */
3654
+ typedef struct ConstraintsSetStmt
3655
+ {
3656
+ NodeTag type;
3657
+ List *constraints; /* List of names as RangeVars */
3658
+ bool deferred;
3659
+ } ConstraintsSetStmt;
3660
+
3661
+ /* ----------------------
3662
+ * REINDEX Statement
3663
+ * ----------------------
3664
+ */
3665
+ typedef enum ReindexObjectType
3666
+ {
3667
+ REINDEX_OBJECT_INDEX, /* index */
3668
+ REINDEX_OBJECT_TABLE, /* table or materialized view */
3669
+ REINDEX_OBJECT_SCHEMA, /* schema */
3670
+ REINDEX_OBJECT_SYSTEM, /* system catalogs */
3671
+ REINDEX_OBJECT_DATABASE /* database */
3672
+ } ReindexObjectType;
3673
+
3674
+ typedef struct ReindexStmt
3675
+ {
3676
+ NodeTag type;
3677
+ ReindexObjectType kind; /* REINDEX_OBJECT_INDEX, REINDEX_OBJECT_TABLE,
3678
+ * etc. */
3679
+ RangeVar *relation; /* Table or index to reindex */
3680
+ const char *name; /* name of database to reindex */
3681
+ List *params; /* list of DefElem nodes */
3682
+ } ReindexStmt;
3683
+
3684
+ /* ----------------------
3685
+ * BACKFILL INDEX Statement
3686
+ * ----------------------
3687
+ */
3688
+
3689
+ /*
3690
+ * YbRowBounds - row bounds for BACKFILL INDEX statement
3691
+ */
3692
+ typedef struct YbRowBounds
3693
+ {
3694
+ NodeTag type;
3695
+ const char *partition_key; /* Partition key of tablet containing bound */
3696
+ const char *row_key_start; /* Starting row of bound (inclusive) */
3697
+ const char *row_key_end; /* Ending row of bound (exclusive) */
3698
+ } YbRowBounds;
3699
+
3700
+ typedef struct YbBackfillInfo
3701
+ {
3702
+ NodeTag type;
3703
+ const char *bfinstr; /* Backfill instruction */
3704
+ uint64_t read_time; /* Read time for backfill */
3705
+ YbRowBounds *row_bounds; /* Rows to backfill */
3706
+ } YbBackfillInfo;
3707
+
3708
+ typedef struct YbBackfillIndexStmt
3709
+ {
3710
+ NodeTag type;
3711
+ List *oid_list; /* Oids of indexes to backfill */
3712
+ YbBackfillInfo *bfinfo;
3713
+ } YbBackfillIndexStmt;
3714
+
3715
+ /* ----------------------
3716
+ * CREATE CONVERSION Statement
3717
+ * ----------------------
3718
+ */
3719
+ typedef struct CreateConversionStmt
3720
+ {
3721
+ NodeTag type;
3722
+ List *conversion_name; /* Name of the conversion */
3723
+ char *for_encoding_name; /* source encoding name */
3724
+ char *to_encoding_name; /* destination encoding name */
3725
+ List *func_name; /* qualified conversion function name */
3726
+ bool def; /* is this a default conversion? */
3727
+ } CreateConversionStmt;
3728
+
3729
+ /* ----------------------
3730
+ * CREATE CAST Statement
3731
+ * ----------------------
3732
+ */
3733
+ typedef struct CreateCastStmt
3734
+ {
3735
+ NodeTag type;
3736
+ TypeName *sourcetype;
3737
+ TypeName *targettype;
3738
+ ObjectWithArgs *func;
3739
+ CoercionContext context;
3740
+ bool inout;
3741
+ } CreateCastStmt;
3742
+
3743
+ /* ----------------------
3744
+ * CREATE TRANSFORM Statement
3745
+ * ----------------------
3746
+ */
3747
+ typedef struct CreateTransformStmt
3748
+ {
3749
+ NodeTag type;
3750
+ bool replace;
3751
+ TypeName *type_name;
3752
+ char *lang;
3753
+ ObjectWithArgs *fromsql;
3754
+ ObjectWithArgs *tosql;
3755
+ } CreateTransformStmt;
3756
+
3757
+ /* ----------------------
3758
+ * PREPARE Statement
3759
+ * ----------------------
3760
+ */
3761
+ typedef struct PrepareStmt
3762
+ {
3763
+ NodeTag type;
3764
+ char *name; /* Name of plan, arbitrary */
3765
+ List *argtypes; /* Types of parameters (List of TypeName) */
3766
+ Node *query; /* The query itself (as a raw parsetree) */
3767
+ } PrepareStmt;
3768
+
3769
+
3770
+ /* ----------------------
3771
+ * EXECUTE Statement
3772
+ * ----------------------
3773
+ */
3774
+
3775
+ typedef struct ExecuteStmt
3776
+ {
3777
+ NodeTag type;
3778
+ char *name; /* The name of the plan to execute */
3779
+ List *params; /* Values to assign to parameters */
3780
+ } ExecuteStmt;
3781
+
3782
+
3783
+ /* ----------------------
3784
+ * DEALLOCATE Statement
3785
+ * ----------------------
3786
+ */
3787
+ typedef struct DeallocateStmt
3788
+ {
3789
+ NodeTag type;
3790
+ char *name; /* The name of the plan to remove */
3791
+ /* NULL means DEALLOCATE ALL */
3792
+ } DeallocateStmt;
3793
+
3794
+ /*
3795
+ * DROP OWNED statement
3796
+ */
3797
+ typedef struct DropOwnedStmt
3798
+ {
3799
+ NodeTag type;
3800
+ List *roles;
3801
+ DropBehavior behavior;
3802
+ } DropOwnedStmt;
3803
+
3804
+ /*
3805
+ * REASSIGN OWNED statement
3806
+ */
3807
+ typedef struct ReassignOwnedStmt
3808
+ {
3809
+ NodeTag type;
3810
+ List *roles;
3811
+ RoleSpec *newrole;
3812
+ } ReassignOwnedStmt;
3813
+
3814
+ /*
3815
+ * TS Dictionary stmts: DefineStmt, RenameStmt and DropStmt are default
3816
+ */
3817
+ typedef struct AlterTSDictionaryStmt
3818
+ {
3819
+ NodeTag type;
3820
+ List *dictname; /* qualified name (list of String) */
3821
+ List *options; /* List of DefElem nodes */
3822
+ } AlterTSDictionaryStmt;
3823
+
3824
+ /*
3825
+ * TS Configuration stmts: DefineStmt, RenameStmt and DropStmt are default
3826
+ */
3827
+ typedef enum AlterTSConfigType
3828
+ {
3829
+ ALTER_TSCONFIG_ADD_MAPPING,
3830
+ ALTER_TSCONFIG_ALTER_MAPPING_FOR_TOKEN,
3831
+ ALTER_TSCONFIG_REPLACE_DICT,
3832
+ ALTER_TSCONFIG_REPLACE_DICT_FOR_TOKEN,
3833
+ ALTER_TSCONFIG_DROP_MAPPING
3834
+ } AlterTSConfigType;
3835
+
3836
+ typedef struct AlterTSConfigurationStmt
3837
+ {
3838
+ NodeTag type;
3839
+ AlterTSConfigType kind; /* ALTER_TSCONFIG_ADD_MAPPING, etc */
3840
+ List *cfgname; /* qualified name (list of String) */
3841
+
3842
+ /*
3843
+ * dicts will be non-NIL if ADD/ALTER MAPPING was specified. If dicts is
3844
+ * NIL, but tokentype isn't, DROP MAPPING was specified.
3845
+ */
3846
+ List *tokentype; /* list of String */
3847
+ List *dicts; /* list of list of String */
3848
+ bool override; /* if true - remove old variant */
3849
+ bool replace; /* if true - replace dictionary by another */
3850
+ bool missing_ok; /* for DROP - skip error if missing? */
3851
+ } AlterTSConfigurationStmt;
3852
+
3853
+ typedef struct PublicationTable
3854
+ {
3855
+ NodeTag type;
3856
+ RangeVar *relation; /* relation to be published */
3857
+ Node *whereClause; /* qualifications */
3858
+ List *columns; /* List of columns in a publication table */
3859
+ } PublicationTable;
3860
+
3861
+ /*
3862
+ * Publication object type
3863
+ */
3864
+ typedef enum PublicationObjSpecType
3865
+ {
3866
+ PUBLICATIONOBJ_TABLE, /* A table */
3867
+ PUBLICATIONOBJ_TABLES_IN_SCHEMA, /* All tables in schema */
3868
+ PUBLICATIONOBJ_TABLES_IN_CUR_SCHEMA, /* All tables in first element of
3869
+ * search_path */
3870
+ PUBLICATIONOBJ_CONTINUATION /* Continuation of previous type */
3871
+ } PublicationObjSpecType;
3872
+
3873
+ typedef struct PublicationObjSpec
3874
+ {
3875
+ NodeTag type;
3876
+ PublicationObjSpecType pubobjtype; /* type of this publication object */
3877
+ char *name;
3878
+ PublicationTable *pubtable;
3879
+ int location; /* token location, or -1 if unknown */
3880
+ } PublicationObjSpec;
3881
+
3882
+ typedef struct CreatePublicationStmt
3883
+ {
3884
+ NodeTag type;
3885
+ char *pubname; /* Name of the publication */
3886
+ List *options; /* List of DefElem nodes */
3887
+ List *pubobjects; /* Optional list of publication objects */
3888
+ bool for_all_tables; /* Special publication for all tables in db */
3889
+ } CreatePublicationStmt;
3890
+
3891
+ typedef enum AlterPublicationAction
3892
+ {
3893
+ AP_AddObjects, /* add objects to publication */
3894
+ AP_DropObjects, /* remove objects from publication */
3895
+ AP_SetObjects /* set list of objects */
3896
+ } AlterPublicationAction;
3897
+
3898
+ typedef struct AlterPublicationStmt
3899
+ {
3900
+ NodeTag type;
3901
+ char *pubname; /* Name of the publication */
3902
+
3903
+ /* parameters used for ALTER PUBLICATION ... WITH */
3904
+ List *options; /* List of DefElem nodes */
3905
+
3906
+ /*
3907
+ * Parameters used for ALTER PUBLICATION ... ADD/DROP/SET publication
3908
+ * objects.
3909
+ */
3910
+ List *pubobjects; /* Optional list of publication objects */
3911
+ bool for_all_tables; /* Special publication for all tables in db */
3912
+ AlterPublicationAction action; /* What action to perform with the given
3913
+ * objects */
3914
+ } AlterPublicationStmt;
3915
+
3916
+ typedef struct CreateSubscriptionStmt
3917
+ {
3918
+ NodeTag type;
3919
+ char *subname; /* Name of the subscription */
3920
+ char *conninfo; /* Connection string to publisher */
3921
+ List *publication; /* One or more publication to subscribe to */
3922
+ List *options; /* List of DefElem nodes */
3923
+ } CreateSubscriptionStmt;
3924
+
3925
+ typedef enum AlterSubscriptionType
3926
+ {
3927
+ ALTER_SUBSCRIPTION_OPTIONS,
3928
+ ALTER_SUBSCRIPTION_CONNECTION,
3929
+ ALTER_SUBSCRIPTION_SET_PUBLICATION,
3930
+ ALTER_SUBSCRIPTION_ADD_PUBLICATION,
3931
+ ALTER_SUBSCRIPTION_DROP_PUBLICATION,
3932
+ ALTER_SUBSCRIPTION_REFRESH,
3933
+ ALTER_SUBSCRIPTION_ENABLED,
3934
+ ALTER_SUBSCRIPTION_SKIP
3935
+ } AlterSubscriptionType;
3936
+
3937
+ typedef struct AlterSubscriptionStmt
3938
+ {
3939
+ NodeTag type;
3940
+ AlterSubscriptionType kind; /* ALTER_SUBSCRIPTION_OPTIONS, etc */
3941
+ char *subname; /* Name of the subscription */
3942
+ char *conninfo; /* Connection string to publisher */
3943
+ List *publication; /* One or more publication to subscribe to */
3944
+ List *options; /* List of DefElem nodes */
3945
+ } AlterSubscriptionStmt;
3946
+
3947
+ typedef struct DropSubscriptionStmt
3948
+ {
3949
+ NodeTag type;
3950
+ char *subname; /* Name of the subscription */
3951
+ bool missing_ok; /* Skip error if missing? */
3952
+ DropBehavior behavior; /* RESTRICT or CASCADE behavior */
3953
+ } DropSubscriptionStmt;
3954
+
3955
+ #endif /* PARSENODES_H */