48 type =
"alter operator family";
51 type =
"alter default privileges";
54 type =
"create operator class";
57 type =
"alter text search configuration";
60 type =
"unknown command type";
94 elog(
ERROR,
"command is not ALTER TABLE");
99 elog(
ERROR,
"empty alter table subcommand list");
105 const char *strtype =
"unrecognized";
110 memset(nulls, 0,
sizeof(nulls));
115 strtype =
"ADD COLUMN";
118 strtype =
"ADD COLUMN TO VIEW";
121 strtype =
"ALTER COLUMN SET DEFAULT";
124 strtype =
"ALTER COLUMN SET DEFAULT (precooked)";
127 strtype =
"DROP NOT NULL";
130 strtype =
"SET NOT NULL";
133 strtype =
"SET EXPRESSION";
136 strtype =
"DROP EXPRESSION";
139 strtype =
"CHECK NOT NULL";
142 strtype =
"SET STATS";
145 strtype =
"SET OPTIONS";
148 strtype =
"RESET OPTIONS";
151 strtype =
"SET STORAGE";
154 strtype =
"SET COMPRESSION";
157 strtype =
"DROP COLUMN";
160 strtype =
"ADD INDEX";
163 strtype =
"(re) ADD INDEX";
166 strtype =
"ADD CONSTRAINT";
169 strtype =
"(re) ADD CONSTRAINT";
172 strtype =
"(re) ADD DOMAIN CONSTRAINT";
175 strtype =
"ALTER CONSTRAINT";
178 strtype =
"VALIDATE CONSTRAINT";
181 strtype =
"ADD CONSTRAINT (using index)";
184 strtype =
"DROP CONSTRAINT";
187 strtype =
"(re) ADD COMMENT";
190 strtype =
"ALTER COLUMN SET TYPE";
193 strtype =
"ALTER COLUMN SET OPTIONS";
196 strtype =
"CHANGE OWNER";
202 strtype =
"DROP CLUSTER";
205 strtype =
"SET LOGGED";
208 strtype =
"SET UNLOGGED";
211 strtype =
"DROP OIDS";
214 strtype =
"SET ACCESS METHOD";
217 strtype =
"SET TABLESPACE";
220 strtype =
"SET RELOPTIONS";
223 strtype =
"RESET RELOPTIONS";
226 strtype =
"REPLACE RELOPTIONS";
229 strtype =
"ENABLE TRIGGER";
232 strtype =
"ENABLE TRIGGER (always)";
235 strtype =
"ENABLE TRIGGER (replica)";
238 strtype =
"DISABLE TRIGGER";
241 strtype =
"ENABLE TRIGGER (all)";
244 strtype =
"DISABLE TRIGGER (all)";
247 strtype =
"ENABLE TRIGGER (user)";
250 strtype =
"DISABLE TRIGGER (user)";
253 strtype =
"ENABLE RULE";
256 strtype =
"ENABLE RULE (always)";
259 strtype =
"ENABLE RULE (replica)";
262 strtype =
"DISABLE RULE";
265 strtype =
"ADD INHERIT";
268 strtype =
"DROP INHERIT";
277 strtype =
"REPLICA IDENTITY";
280 strtype =
"ENABLE ROW SECURITY";
283 strtype =
"DISABLE ROW SECURITY";
286 strtype =
"FORCE ROW SECURITY";
289 strtype =
"NO FORCE ROW SECURITY";
292 strtype =
"SET OPTIONS";
295 strtype =
"DETACH PARTITION";
298 strtype =
"ATTACH PARTITION";
301 strtype =
"DETACH PARTITION ... FINALIZE";
304 strtype =
"ADD IDENTITY";
307 strtype =
"SET IDENTITY";
310 strtype =
"DROP IDENTITY";
313 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,...)
CollectedCommandType type
union CollectedCommand::@120 d
struct CollectedCommand::@120::@122 alterTable
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)