Consistently use "superuser" instead of "super user"
[pgsql.git] / src / include / tcop / deparse_utility.h
blob371c6f33bc102a461d7d420fbe6b2f7d148baa76
1 /*-------------------------------------------------------------------------
3 * deparse_utility.h
5 * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
6 * Portions Copyright (c) 1994, Regents of the University of California
8 * src/include/tcop/deparse_utility.h
10 *-------------------------------------------------------------------------
12 #ifndef DEPARSE_UTILITY_H
13 #define DEPARSE_UTILITY_H
15 #include "access/attnum.h"
16 #include "catalog/objectaddress.h"
17 #include "nodes/nodes.h"
18 #include "utils/aclchk_internal.h"
22 * Support for keeping track of collected commands.
24 typedef enum CollectedCommandType
26 SCT_Simple,
27 SCT_AlterTable,
28 SCT_Grant,
29 SCT_AlterOpFamily,
30 SCT_AlterDefaultPrivileges,
31 SCT_CreateOpClass,
32 SCT_AlterTSConfig
33 } CollectedCommandType;
36 * For ALTER TABLE commands, we keep a list of the subcommands therein.
38 typedef struct CollectedATSubcmd
40 ObjectAddress address; /* affected column, constraint, index, ... */
41 Node *parsetree;
42 } CollectedATSubcmd;
44 typedef struct CollectedCommand
46 CollectedCommandType type;
48 bool in_extension;
49 Node *parsetree;
51 union
53 /* most commands */
54 struct
56 ObjectAddress address;
57 ObjectAddress secondaryObject;
58 } simple;
60 /* ALTER TABLE, and internal uses thereof */
61 struct
63 Oid objectId;
64 Oid classId;
65 List *subcmds;
66 } alterTable;
68 /* GRANT / REVOKE */
69 struct
71 InternalGrant *istmt;
72 } grant;
74 /* ALTER OPERATOR FAMILY */
75 struct
77 ObjectAddress address;
78 List *operators;
79 List *procedures;
80 } opfam;
82 /* CREATE OPERATOR CLASS */
83 struct
85 ObjectAddress address;
86 List *operators;
87 List *procedures;
88 } createopc;
90 /* ALTER TEXT SEARCH CONFIGURATION ADD/ALTER/DROP MAPPING */
91 struct
93 ObjectAddress address;
94 Oid *dictIds;
95 int ndicts;
96 } atscfg;
98 /* ALTER DEFAULT PRIVILEGES */
99 struct
101 ObjectType objtype;
102 } defprivs;
103 } d;
105 struct CollectedCommand *parent; /* when nested */
106 } CollectedCommand;
108 #endif /* DEPARSE_UTILITY_H */