Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Consults PostgreSQL's gram.y grammar and parser sources to guide SQL syntax parsing and DDL generation in pgschema.
87% 96%+9 ptsof test cases passed
Passed 22 of 23 test cases with the skill, and 20 of 23 without it.
3 of 3 safety checks passed
Not used yet
Use this skill when you need to understand PostgreSQL's SQL syntax, DDL statement structure, or how PostgreSQL parses specific SQL constructs. This is essential for correctly parsing SQL files and generating valid DDL in pgschema.
Invoke this skill when:
ir/parser.gointernal/diff/*.goMain parser directory: https://github.com/postgres/postgres/blob/master/src/backend/parser/
Key files to reference:
gram.y - Main grammar file - Yacc/Bison grammar defining PostgreSQL SQL syntaxscan.l - Lexical scanner (Flex/Lex) - tokenization ruleskeywords.c - Reserved and non-reserved keywordsparse_clause.c - Parsing of clauses (WHERE, GROUP BY, ORDER BY, etc.)parse_expr.c - Expression parsing (operators, function calls, etc.)parse_type.c - Type name parsing and resolutionparse_relation.c - Table and relation parsingparse_target.c - Target list parsing (SELECT list, etc.)parse_func.c - Function call parsingparse_utilcmd.c - Utility commands (DDL statements like CREATE, ALTER, DROP)analyze.c - Post-parse analysisparse_node.c - Parse node creation utilitiesNext to this one in the catalogue, plus more from the same author.