Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef PREPARE_H
00014 #define PREPARE_H
00015
00016 #include "commands/explain.h"
00017 #include "datatype/timestamp.h"
00018 #include "utils/plancache.h"
00019
00020
00021
00022
00023
00024
00025
00026
00027 typedef struct
00028 {
00029
00030 char stmt_name[NAMEDATALEN];
00031 CachedPlanSource *plansource;
00032 bool from_sql;
00033 TimestampTz prepare_time;
00034 } PreparedStatement;
00035
00036
00037
00038 extern void PrepareQuery(PrepareStmt *stmt, const char *queryString);
00039 extern void ExecuteQuery(ExecuteStmt *stmt, IntoClause *intoClause,
00040 const char *queryString, ParamListInfo params,
00041 DestReceiver *dest, char *completionTag);
00042 extern void DeallocateQuery(DeallocateStmt *stmt);
00043 extern void ExplainExecuteQuery(ExecuteStmt *execstmt, IntoClause *into,
00044 ExplainState *es,
00045 const char *queryString, ParamListInfo params);
00046
00047
00048 extern void StorePreparedStatement(const char *stmt_name,
00049 CachedPlanSource *plansource,
00050 bool from_sql);
00051 extern PreparedStatement *FetchPreparedStatement(const char *stmt_name,
00052 bool throwError);
00053 extern void DropPreparedStatement(const char *stmt_name, bool showError);
00054 extern TupleDesc FetchPreparedStatementResultDesc(PreparedStatement *stmt);
00055 extern List *FetchPreparedStatementTargetList(PreparedStatement *stmt);
00056
00057 extern void DropAllPreparedStatements(void);
00058
00059 #endif