46 type =
"alter operator family";
49 type =
"alter default privileges";
52 type =
"create operator class";
55 type =
"alter text search configuration";
58 type =
"unknown command type";
92 elog(
ERROR,
"command is not ALTER TABLE");
103 strtype =
"ADD COLUMN";
106 strtype =
"ADD COLUMN (and recurse)";
109 strtype =
"ADD COLUMN TO VIEW";
112 strtype =
"ALTER COLUMN SET DEFAULT";
115 strtype =
"ALTER COLUMN SET DEFAULT (precooked)";
118 strtype =
"DROP NOT NULL";
121 strtype =
"SET NOT NULL";
124 strtype =
"CHECK NOT NULL";
127 strtype =
"SET STATS";
130 strtype =
"SET OPTIONS";
133 strtype =
"RESET OPTIONS";
136 strtype =
"SET STORAGE";
139 strtype =
"DROP COLUMN";
142 strtype =
"DROP COLUMN (and recurse)";
145 strtype =
"ADD INDEX";
148 strtype =
"(re) ADD INDEX";
151 strtype =
"ADD CONSTRAINT";
154 strtype =
"ADD CONSTRAINT (and recurse)";
157 strtype =
"(re) ADD CONSTRAINT";
160 strtype =
"ALTER CONSTRAINT";
163 strtype =
"VALIDATE CONSTRAINT";
166 strtype =
"VALIDATE CONSTRAINT (and recurse)";
169 strtype =
"ADD CONSTRAINT (using index)";
172 strtype =
"DROP CONSTRAINT";
175 strtype =
"DROP CONSTRAINT (and recurse)";
178 strtype =
"(re) ADD COMMENT";
181 strtype =
"ALTER COLUMN SET TYPE";
184 strtype =
"ALTER COLUMN SET OPTIONS";
187 strtype =
"CHANGE OWNER";
193 strtype =
"DROP CLUSTER";
196 strtype =
"SET LOGGED";
199 strtype =
"SET UNLOGGED";
202 strtype =
"DROP OIDS";
205 strtype =
"SET TABLESPACE";
208 strtype =
"SET RELOPTIONS";
211 strtype =
"RESET RELOPTIONS";
214 strtype =
"REPLACE RELOPTIONS";
217 strtype =
"ENABLE TRIGGER";
220 strtype =
"ENABLE TRIGGER (always)";
223 strtype =
"ENABLE TRIGGER (replica)";
226 strtype =
"DISABLE TRIGGER";
229 strtype =
"ENABLE TRIGGER (all)";
232 strtype =
"DISABLE TRIGGER (all)";
235 strtype =
"ENABLE TRIGGER (user)";
238 strtype =
"DISABLE TRIGGER (user)";
241 strtype =
"ENABLE RULE";
244 strtype =
"ENABLE RULE (always)";
247 strtype =
"ENABLE RULE (replica)";
250 strtype =
"DISABLE RULE";
253 strtype =
"ADD INHERIT";
256 strtype =
"DROP INHERIT";
265 strtype =
"REPLICA IDENTITY";
268 strtype =
"ENABLE ROW SECURITY";
271 strtype =
"DISABLE ROW SECURITY";
274 strtype =
"FORCE ROW SECURITY";
277 strtype =
"NO FORCE ROW SECURITY";
280 strtype =
"SET OPTIONS";
283 strtype =
"unrecognized";
293 elog(
ERROR,
"empty alter table subcommand list");
Datum get_command_type(PG_FUNCTION_ARGS)
#define castNode(_type_, nodeptr)
static const char * CreateCommandName(Node *parsetree)
struct CollectedCommand::@110::@112 alterTable
Datum get_command_tag(PG_FUNCTION_ARGS)
#define PG_GETARG_POINTER(n)
CollectedCommandType type
PG_FUNCTION_INFO_V1(get_command_type)
MemoryContext CurrentMemoryContext
#define PG_RETURN_ARRAYTYPE_P(x)
Datum makeArrayResult(ArrayBuildState *astate, MemoryContext rcontext)
union CollectedCommand::@110 d
#define PG_RETURN_TEXT_P(x)
text * cstring_to_text(const char *s)
Datum get_altertable_subcmdtypes(PG_FUNCTION_ARGS)
ArrayBuildState * accumArrayResult(ArrayBuildState *astate, Datum dvalue, bool disnull, Oid element_type, MemoryContext rcontext)
#define CStringGetTextDatum(s)