LCOV - code coverage report
Current view: top level - src/include/tcop - cmdtag.h (source / functions) Coverage Total Hit
Test: Code coverage Lines: 100.0 % 8 8
Test Date: 2026-01-26 10:56:24 Functions: 100.0 % 2 2
Legend: Lines:     hit not hit

            Line data    Source code
       1              : /*-------------------------------------------------------------------------
       2              :  *
       3              :  * cmdtag.h
       4              :  *        Declarations for commandtag names and enumeration.
       5              :  *
       6              :  * Portions Copyright (c) 1996-2026, 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              : /* buffer size required for command completion tags */
      17              : #define COMPLETION_TAG_BUFSIZE  64
      18              : 
      19              : #define PG_CMDTAG(tag, name, evtrgok, rwrok, rowcnt) \
      20              :         tag,
      21              : 
      22              : typedef enum CommandTag
      23              : {
      24              : #include "tcop/cmdtaglist.h"
      25              : } CommandTag;
      26              : 
      27              : #undef PG_CMDTAG
      28              : 
      29              : typedef struct QueryCompletion
      30              : {
      31              :         CommandTag      commandTag;
      32              :         uint64          nprocessed;
      33              : } QueryCompletion;
      34              : 
      35              : 
      36              : static inline void
      37         6900 : SetQueryCompletion(QueryCompletion *qc, CommandTag commandTag,
      38              :                                    uint64 nprocessed)
      39              : {
      40         6900 :         qc->commandTag = commandTag;
      41         6900 :         qc->nprocessed = nprocessed;
      42         6900 : }
      43              : 
      44              : static inline void
      45        47127 : CopyQueryCompletion(QueryCompletion *dst, const QueryCompletion *src)
      46              : {
      47        47127 :         dst->commandTag = src->commandTag;
      48        47127 :         dst->nprocessed = src->nprocessed;
      49        47127 : }
      50              : 
      51              : 
      52              : extern void InitializeQueryCompletion(QueryCompletion *qc);
      53              : extern const char *GetCommandTagName(CommandTag commandTag);
      54              : extern const char *GetCommandTagNameAndLen(CommandTag commandTag, Size *len);
      55              : extern bool command_tag_display_rowcount(CommandTag commandTag);
      56              : extern bool command_tag_event_trigger_ok(CommandTag commandTag);
      57              : extern bool command_tag_table_rewrite_ok(CommandTag commandTag);
      58              : extern CommandTag GetCommandTagEnum(const char *commandname);
      59              : extern Size BuildQueryCompletionString(char *buff, const QueryCompletion *qc,
      60              :                                                                            bool nameonly);
      61              : 
      62              : #endif                                                  /* CMDTAG_H */
        

Generated by: LCOV version 2.3.2-1