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 ATTNOTNULL";
136 strtype =
"DROP EXPRESSION";
139 strtype =
"SET STATS";
142 strtype =
"SET OPTIONS";
145 strtype =
"RESET OPTIONS";
148 strtype =
"SET STORAGE";
151 strtype =
"SET COMPRESSION";
154 strtype =
"DROP COLUMN";
157 strtype =
"ADD INDEX";
160 strtype =
"(re) ADD INDEX";
163 strtype =
"ADD CONSTRAINT";
166 strtype =
"(re) ADD CONSTRAINT";
169 strtype =
"(re) ADD DOMAIN CONSTRAINT";
172 strtype =
"ALTER CONSTRAINT";
175 strtype =
"VALIDATE CONSTRAINT";
178 strtype =
"ADD CONSTRAINT (using index)";
181 strtype =
"DROP CONSTRAINT";
184 strtype =
"(re) ADD COMMENT";
187 strtype =
"ALTER COLUMN SET TYPE";
190 strtype =
"ALTER COLUMN SET OPTIONS";
193 strtype =
"CHANGE OWNER";
199 strtype =
"DROP CLUSTER";
202 strtype =
"SET LOGGED";
205 strtype =
"SET UNLOGGED";
208 strtype =
"DROP OIDS";
211 strtype =
"SET ACCESS METHOD";
214 strtype =
"SET TABLESPACE";
217 strtype =
"SET RELOPTIONS";
220 strtype =
"RESET RELOPTIONS";
223 strtype =
"REPLACE RELOPTIONS";
226 strtype =
"ENABLE TRIGGER";
229 strtype =
"ENABLE TRIGGER (always)";
232 strtype =
"ENABLE TRIGGER (replica)";
235 strtype =
"DISABLE TRIGGER";
238 strtype =
"ENABLE TRIGGER (all)";
241 strtype =
"DISABLE TRIGGER (all)";
244 strtype =
"ENABLE TRIGGER (user)";
247 strtype =
"DISABLE TRIGGER (user)";
250 strtype =
"ENABLE RULE";
253 strtype =
"ENABLE RULE (always)";
256 strtype =
"ENABLE RULE (replica)";
259 strtype =
"DISABLE RULE";
262 strtype =
"ADD INHERIT";
265 strtype =
"DROP INHERIT";
274 strtype =
"REPLICA IDENTITY";
277 strtype =
"ENABLE ROW SECURITY";
280 strtype =
"DISABLE ROW SECURITY";
283 strtype =
"FORCE ROW SECURITY";
286 strtype =
"NO FORCE ROW SECURITY";
289 strtype =
"SET OPTIONS";
292 strtype =
"DETACH PARTITION";
295 strtype =
"ATTACH PARTITION";
298 strtype =
"DETACH PARTITION ... FINALIZE";
301 strtype =
"ADD IDENTITY";
304 strtype =
"SET IDENTITY";
307 strtype =
"DROP IDENTITY";
310 strtype =
"(re) ADD STATS";
static Datum values[MAXATTR]
#define CStringGetTextDatum(s)
#define OidIsValid(objectId)
elog(ERROR, "%s: %s", p2, msg)
@ 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::@112 d
struct CollectedCommand::@112::@114 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, Datum *values, bool *isnull)
static const char * CreateCommandName(Node *parsetree)
text * cstring_to_text(const char *s)