#ifndef DEPARSE_UTILITY_H
#define DEPARSE_UTILITY_H
#include "access/attnum.h"
#include "catalog/objectaddress.h"
#include "nodes/nodes.h"
#include "utils/aclchk_internal.h"
typedef enum CollectedCommandType
{
SCT_Simple,
SCT_AlterTable,
SCT_Grant,
SCT_AlterOpFamily,
SCT_AlterDefaultPrivileges,
SCT_CreateOpClass,
SCT_AlterTSConfig,
} CollectedCommandType;
typedef struct CollectedATSubcmd
{
ObjectAddress address;
Node *parsetree;
} CollectedATSubcmd;
typedef struct CollectedCommand
{
CollectedCommandType type;
bool in_extension;
Node *parsetree;
union
{
struct
{
ObjectAddress address;
ObjectAddress secondaryObject;
} simple;
struct
{
Oid objectId;
Oid classId;
List *subcmds;
} alterTable;
struct
{
InternalGrant *istmt;
} grant;
struct
{
ObjectAddress address;
List *operators;
List *procedures;
} opfam;
struct
{
ObjectAddress address;
List *operators;
List *procedures;
} createopc;
struct
{
ObjectAddress address;
Oid *dictIds;
int ndicts;
} atscfg;
struct
{
ObjectType objtype;
} defprivs;
} d;
struct CollectedCommand *parent;
} CollectedCommand;
#endif