Skip to content

Misleading comment/Assert in pg_stat_query_plans_storage.c #4

Open

Description

@Kokokokoka
342: * If kind is PGQP_PLAN or PGQP_EXEC, its value is used as the array position
368:  Assert(kind == PGQP_PLAN || kind == PGQP_EXEC);

Comment states:

 * If kind is PGQP_PLAN or PGQP_EXEC, its value is used as the array position
 * for the arrays in the Counters field.

Which implies that there can be other query types, but the assert later contradicts with the specification.
Either comment should be rephrased, or Assert.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions