| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| #ifndef PREPARE_H |
| #define PREPARE_H |
|
|
| #include "commands/explain.h" |
| #include "datatype/timestamp.h" |
| #include "utils/plancache.h" |
|
|
| |
| |
| |
| |
| |
| |
| |
| typedef struct |
| { |
| |
| char stmt_name[NAMEDATALEN]; |
| CachedPlanSource *plansource; |
| bool from_sql; |
| TimestampTz prepare_time; |
| } PreparedStatement; |
|
|
|
|
| |
| extern void PrepareQuery(ParseState *pstate, PrepareStmt *stmt, |
| int stmt_location, int stmt_len); |
| extern void ExecuteQuery(ParseState *pstate, |
| ExecuteStmt *stmt, IntoClause *intoClause, |
| ParamListInfo params, |
| DestReceiver *dest, QueryCompletion *qc); |
| extern void DeallocateQuery(DeallocateStmt *stmt); |
| extern void ExplainExecuteQuery(ExecuteStmt *execstmt, IntoClause *into, |
| ExplainState *es, const char *queryString, |
| ParamListInfo params, QueryEnvironment *queryEnv); |
|
|
| |
| extern void StorePreparedStatement(const char *stmt_name, |
| CachedPlanSource *plansource, |
| bool from_sql); |
| extern PreparedStatement *FetchPreparedStatement(const char *stmt_name, |
| bool throwError); |
| extern void DropPreparedStatement(const char *stmt_name, bool showError); |
| extern TupleDesc FetchPreparedStatementResultDesc(PreparedStatement *stmt); |
| extern List *FetchPreparedStatementTargetList(PreparedStatement *stmt); |
|
|
| extern void DropAllPreparedStatements(void); |
|
|
| #endif |
|
|