PostgreSQL Source Code  git master
deparse_utility.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * deparse_utility.h
4  *
5  * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
6  * Portions Copyright (c) 1994, Regents of the University of California
7  *
8  * src/include/tcop/deparse_utility.h
9  *
10  *-------------------------------------------------------------------------
11  */
12 #ifndef DEPARSE_UTILITY_H
13 #define DEPARSE_UTILITY_H
14 
15 #include "access/attnum.h"
16 #include "catalog/objectaddress.h"
17 #include "nodes/nodes.h"
18 #include "utils/aclchk_internal.h"
19 
20 
21 /*
22  * Support for keeping track of collected commands.
23  */
25 {
34 
35 /*
36  * For ALTER TABLE commands, we keep a list of the subcommands therein.
37  */
38 typedef struct CollectedATSubcmd
39 {
40  ObjectAddress address; /* affected column, constraint, index, ... */
43 
44 typedef struct CollectedCommand
45 {
47 
50 
51  union
52  {
53  /* most commands */
54  struct
55  {
58  } simple;
59 
60  /* ALTER TABLE, and internal uses thereof */
61  struct
62  {
67 
68  /* GRANT / REVOKE */
69  struct
70  {
72  } grant;
73 
74  /* ALTER OPERATOR FAMILY */
75  struct
76  {
80  } opfam;
81 
82  /* CREATE OPERATOR CLASS */
83  struct
84  {
86  List *operators;
89 
90  /* ALTER TEXT SEARCH CONFIGURATION ADD/ALTER/DROP MAPPING */
91  struct
92  {
95  int ndicts;
96  } atscfg;
97 
98  /* ALTER DEFAULT PRIVILEGES */
99  struct
100  {
103  } d;
104 
105  struct CollectedCommand *parent; /* when nested */
107 
108 #endif /* DEPARSE_UTILITY_H */
struct CollectedCommand CollectedCommand
CollectedCommandType
@ SCT_Simple
@ SCT_AlterTSConfig
@ SCT_AlterDefaultPrivileges
@ SCT_Grant
@ SCT_CreateOpClass
@ SCT_AlterOpFamily
@ SCT_AlterTable
struct CollectedATSubcmd CollectedATSubcmd
ObjectType
Definition: parsenodes.h:2108
unsigned int Oid
Definition: postgres_ext.h:31
ObjectAddress address
CollectedCommandType type
struct CollectedCommand::@113::@118 createopc
InternalGrant * istmt
struct CollectedCommand::@113::@115 alterTable
struct CollectedCommand::@113::@116 grant
struct CollectedCommand * parent
union CollectedCommand::@113 d
struct CollectedCommand::@113::@117 opfam
ObjectAddress secondaryObject
struct CollectedCommand::@113::@120 defprivs
struct CollectedCommand::@113::@119 atscfg
ObjectAddress address
struct CollectedCommand::@113::@114 simple
Definition: pg_list.h:54
Definition: nodes.h:129