47 type =
"alter operator family";
50 type =
"alter default privileges";
53 type =
"create operator class";
56 type =
"alter text search configuration";
59 type =
"unknown command type";
93 elog(
ERROR,
"command is not ALTER TABLE");
98 elog(
ERROR,
"empty alter table subcommand list");
104 const char *strtype =
"unrecognized";
109 memset(nulls, 0,
sizeof(nulls));
114 strtype =
"ADD COLUMN";
117 strtype =
"ADD COLUMN TO VIEW";
120 strtype =
"ALTER COLUMN SET DEFAULT";
123 strtype =
"ALTER COLUMN SET DEFAULT (precooked)";
126 strtype =
"DROP NOT NULL";
129 strtype =
"SET NOT NULL";
132 strtype =
"SET EXPRESSION";
135 strtype =
"DROP EXPRESSION";
138 strtype =
"SET STATS";
141 strtype =
"SET OPTIONS";
144 strtype =
"RESET OPTIONS";
147 strtype =
"SET STORAGE";
150 strtype =
"SET COMPRESSION";
153 strtype =
"DROP COLUMN";
156 strtype =
"ADD INDEX";
159 strtype =
"(re) ADD INDEX";
162 strtype =
"ADD CONSTRAINT";
165 strtype =
"(re) ADD CONSTRAINT";
168 strtype =
"(re) ADD DOMAIN CONSTRAINT";
171 strtype =
"ALTER CONSTRAINT";
174 strtype =
"VALIDATE CONSTRAINT";
177 strtype =
"ADD CONSTRAINT (using index)";
180 strtype =
"DROP CONSTRAINT";
183 strtype =
"(re) ADD COMMENT";
186 strtype =
"ALTER COLUMN SET TYPE";
189 strtype =
"ALTER COLUMN SET OPTIONS";
192 strtype =
"CHANGE OWNER";
198 strtype =
"DROP CLUSTER";
201 strtype =
"SET LOGGED";
204 strtype =
"SET UNLOGGED";
207 strtype =
"DROP OIDS";
210 strtype =
"SET ACCESS METHOD";
213 strtype =
"SET TABLESPACE";
216 strtype =
"SET RELOPTIONS";
219 strtype =
"RESET RELOPTIONS";
222 strtype =
"REPLACE RELOPTIONS";
225 strtype =
"ENABLE TRIGGER";
228 strtype =
"ENABLE TRIGGER (always)";
231 strtype =
"ENABLE TRIGGER (replica)";
234 strtype =
"DISABLE TRIGGER";
237 strtype =
"ENABLE TRIGGER (all)";
240 strtype =
"DISABLE TRIGGER (all)";
243 strtype =
"ENABLE TRIGGER (user)";
246 strtype =
"DISABLE TRIGGER (user)";
249 strtype =
"ENABLE RULE";
252 strtype =
"ENABLE RULE (always)";
255 strtype =
"ENABLE RULE (replica)";
258 strtype =
"DISABLE RULE";
261 strtype =
"ADD INHERIT";
264 strtype =
"DROP INHERIT";
273 strtype =
"REPLICA IDENTITY";
276 strtype =
"ENABLE ROW SECURITY";
279 strtype =
"DISABLE ROW SECURITY";
282 strtype =
"FORCE ROW SECURITY";
285 strtype =
"NO FORCE ROW SECURITY";
288 strtype =
"SET OPTIONS";
291 strtype =
"DETACH PARTITION";
294 strtype =
"ATTACH PARTITION";
297 strtype =
"DETACH PARTITION ... FINALIZE";
300 strtype =
"ADD IDENTITY";
303 strtype =
"SET IDENTITY";
306 strtype =
"DROP IDENTITY";
309 strtype =
"(re) ADD STATS";
static Datum values[MAXATTR]
#define CStringGetTextDatum(s)
#define OidIsValid(objectId)
@ SCT_AlterDefaultPrivileges
#define PG_GETARG_POINTER(n)
#define PG_RETURN_TEXT_P(x)
void InitMaterializedSRF(FunctionCallInfo fcinfo, bits32 flags)
if(TABLE==NULL||TABLE_index==NULL)
#define castNode(_type_, nodeptr)
char * getObjectDescription(const ObjectAddress *object, bool missing_ok)
@ AT_DetachPartitionFinalize
@ AT_ReAddDomainConstraint
@ AT_AlterColumnGenericOptions
char * psprintf(const char *fmt,...)
struct CollectedCommand::@128::@130 alterTable
CollectedCommandType type
union CollectedCommand::@128 d
Tuplestorestate * setResult
Datum get_altertable_subcmdinfo(PG_FUNCTION_ARGS)
Datum get_command_type(PG_FUNCTION_ARGS)
PG_FUNCTION_INFO_V1(get_command_type)
Datum get_command_tag(PG_FUNCTION_ARGS)
void tuplestore_putvalues(Tuplestorestate *state, TupleDesc tdesc, const Datum *values, const bool *isnull)
static const char * CreateCommandName(Node *parsetree)
text * cstring_to_text(const char *s)