diff --git a/src/backend/commands/createas.c b/src/backend/commands/createas.c index 9abbb6b555..9568ccc429 100644 --- a/src/backend/commands/createas.c +++ b/src/backend/commands/createas.c @@ -51,17 +51,6 @@ #include "utils/rls.h" #include "utils/snapmgr.h" -typedef struct -{ - DestReceiver pub; /* publicly-known function pointers */ - IntoClause *into; /* target relation specification */ - /* These fields are filled by intorel_startup: */ - Relation rel; /* relation to write to */ - ObjectAddress reladdr; /* address of rel, for ExecCreateTableAs */ - CommandId output_cid; /* cmin to insert in output tuples */ - int ti_options; /* table_tuple_insert performance options */ - BulkInsertState bistate; /* bulk insert state */ -} DR_intorel; /* utility functions for CTAS definition creation */ static ObjectAddress create_ctas_internal(List *attrList, IntoClause *into); diff --git a/src/include/commands/createas.h b/src/include/commands/createas.h index 54a38491fb..36e6692dc7 100644 --- a/src/include/commands/createas.h +++ b/src/include/commands/createas.h @@ -19,6 +19,7 @@ #include "parser/parse_node.h" #include "tcop/dest.h" #include "utils/queryenvironment.h" +#include "access/heapam.h" extern ObjectAddress ExecCreateTableAs(ParseState *pstate, CreateTableAsStmt *stmt, @@ -31,4 +32,16 @@ extern DestReceiver *CreateIntoRelDestReceiver(IntoClause *intoClause); extern bool CreateTableAsRelExists(CreateTableAsStmt *ctas); +typedef struct +{ + DestReceiver pub; /* publicly-known function pointers */ + IntoClause *into; /* target relation specification */ + /* These fields are filled by intorel_startup: */ + Relation rel; /* relation to write to */ + ObjectAddress reladdr; /* address of rel, for ExecCreateTableAs */ + CommandId output_cid; /* cmin to insert in output tuples */ + int ti_options; /* table_tuple_insert performance options */ + BulkInsertState bistate; /* bulk insert state */ +} DR_intorel; + #endif /* CREATEAS_H */