PostgreSQL Source Code  git master
cmdtag.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * cmdtag.h
4  * Declarations for commandtag names and enumeration.
5  *
6  * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
7  * Portions Copyright (c) 1994, Regents of the University of California
8  *
9  * src/include/tcop/cmdtag.h
10  *
11  *-------------------------------------------------------------------------
12  */
13 #ifndef CMDTAG_H
14 #define CMDTAG_H
15 
16 
17 #define PG_CMDTAG(tag, name, evtrgok, rwrok, rowcnt) \
18  tag,
19 
20 typedef enum CommandTag
21 {
22 #include "tcop/cmdtaglist.h"
24 } CommandTag;
25 
26 #undef PG_CMDTAG
27 
28 typedef struct QueryCompletion
29 {
31  uint64 nprocessed;
33 
34 
35 static inline void
37  uint64 nprocessed)
38 {
39  qc->commandTag = commandTag;
40  qc->nprocessed = nprocessed;
41 }
42 
43 static inline void
45 {
46  dst->commandTag = src->commandTag;
47  dst->nprocessed = src->nprocessed;
48 }
49 
50 
52 extern const char *GetCommandTagName(CommandTag commandTag);
56 extern CommandTag GetCommandTagEnum(const char *tagname);
57 
58 #endif /* CMDTAG_H */
bool command_tag_table_rewrite_ok(CommandTag commandTag)
Definition: cmdtag.c:63
CommandTag
Definition: cmdtag.h:20
const char * GetCommandTagName(CommandTag commandTag)
Definition: cmdtag.c:45
void InitializeQueryCompletion(QueryCompletion *qc)
Definition: cmdtag.c:38
bool command_tag_display_rowcount(CommandTag commandTag)
Definition: cmdtag.c:51
CommandTag GetCommandTagEnum(const char *tagname)
Definition: cmdtag.c:74
bool command_tag_event_trigger_ok(CommandTag commandTag)
Definition: cmdtag.c:57
uint64 nprocessed
Definition: cmdtag.h:31
CommandTag commandTag
Definition: cmdtag.h:30
static void CopyQueryCompletion(QueryCompletion *dst, const QueryCompletion *src)
Definition: cmdtag.h:44
static void SetQueryCompletion(QueryCompletion *qc, CommandTag commandTag, uint64 nprocessed)
Definition: cmdtag.h:36
struct QueryCompletion QueryCompletion