Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-23.1: sql: add plpgsql parser for telemetry purposes #103026

Merged
merged 11 commits into from
May 11, 2023

Commits on May 10, 2023

  1. sql: add plpgsql parser scaffold.

    This commit adds the code generation portion of the parser.
    The parser does not parse statements yet.
    This commit also creates a base scanner struct so that the plpgsql
    and sql scanner can share methods. The two scanners have their
    own language specific scan methods.
    
    Release note: None
    chengxiong-ruan authored and e-mbrown committed May 10, 2023
    Configuration menu
    Copy the full SHA
    257575a View commit details
    Browse the repository at this point in the history
  2. sql: declare section and exec sql

    Adds the first test which parses an empty function or
    function with bare sql queries.
    
    Release note: None
    chengxiong-ruan authored and e-mbrown committed May 10, 2023
    Configuration menu
    Copy the full SHA
    2765f30 View commit details
    Browse the repository at this point in the history
  3. sql: add lexer.ReadSqlExpressionStr() and stmt_if

    This commit adds `lexer.ReadSqlExpressionStr()` which
    gives access to the return type of a plpgsql function.
    
    This commit also adds grammar rules and AST for
    `stmt_if`
    
    Release note: None
    ZhouXing19 authored and e-mbrown committed May 10, 2023
    Configuration menu
    Copy the full SHA
    25f17f9 View commit details
    Browse the repository at this point in the history
  4. sql: add plpgsql decl_header and stmt_assert

    This commit adds AST and grammar rules for
    `decl_header` and `stmt_assert`
    
    Release note: None
    chengxiong-ruan authored and e-mbrown committed May 10, 2023
    Configuration menu
    Copy the full SHA
    6820fdb View commit details
    Browse the repository at this point in the history
  5. sql: stmt_call, stmt_close, stmt_dynaexec, stmt_exit

    This commit adds the AST and grammar rules for `stmt_call`,
    `stmt_close`, `stmt_dynaexec`, and `stmt_exit`
    
    Release note: None
    chengxiong-ruan authored and e-mbrown committed May 10, 2023
    Configuration menu
    Copy the full SHA
    6cd98d9 View commit details
    Browse the repository at this point in the history
  6. sql: stmt_assign and stmt_getdiag

    This commit adds the AST and grammar rules for
    `stmt_assign` and `stmt_getdiag`
    
    Release note: None
    ZhouXing19 authored and e-mbrown committed May 10, 2023
    Configuration menu
    Copy the full SHA
    7b245cb View commit details
    Browse the repository at this point in the history
  7. sql: Adds support for stmt_case

    This commit adds portions of the logic to parse `stmt_case`.
    Does not yet support ELSE, sql statements in THEN body, or END CASE (it
    uses an ENDCASE hack).
    
    Release note: None
    rharding6373 authored and e-mbrown committed May 10, 2023
    Configuration menu
    Copy the full SHA
    3b22ee1 View commit details
    Browse the repository at this point in the history
  8. sql: fix endif and endcase

    This commit corrects the grammar rules for `stmt_case`.
    
    Release note: None
    chengxiong-ruan authored and e-mbrown committed May 10, 2023
    Configuration menu
    Copy the full SHA
    b4d7d8d View commit details
    Browse the repository at this point in the history
  9. sql: Complete stmt_if, elsif, else logic

    This commit corrects the grammar rules and AST of
    `stmt_if`, `elsif`, `else` statements.
    
    Release note: None
    ZhouXing19 authored and e-mbrown committed May 10, 2023
    Configuration menu
    Copy the full SHA
    4d21772 View commit details
    Browse the repository at this point in the history
  10. sql: add stmt_open

    This commit adds logic for `stmt_open`
    
    Release note: None
    ZhouXing19 authored and e-mbrown committed May 10, 2023
    Configuration menu
    Copy the full SHA
    16acd8c View commit details
    Browse the repository at this point in the history
  11. server,sql: Make the statement struct generic

    This commit makes Statement generic so it can be shared between
    the sql and plpgsql parsers.
    
    Release note: None
    e-mbrown committed May 10, 2023
    Configuration menu
    Copy the full SHA
    0216286 View commit details
    Browse the repository at this point in the history