{"schema": "pgtrue.report/1", "url": "https://pgtrue.postgres.ai/shared/brief/3fb887ba-4a90-461d-b0be-e3156710fa67", "published": "2026-10-19T07:24:38Z", "publisher": "PostgresAI", "article": {"title": "A 2.5x faster Postgres parser with Claude Code", "url": "https://multigres.com/blog/ai-parser-engineering", "date_published": "2026-02-05T00:00:00Z", "author": "Manan Gupta", "publisher": "Multigres"}, "grade": "B", "axes": [{"axis": "Factual", "summary": "A \u00b7 0 wrong of 12 checked \u00b7 0 caveats"}, {"axis": "Applicable", "summary": "A \u00b7 0 wrong of 6 checked \u00b7 0 caveats"}, {"axis": "Consistent", "summary": "A \u00b7 0 wrong of 12 checked \u00b7 0 caveats"}, {"axis": "Transparent", "summary": "C \u00b7 0 wrong of 3 checked \u00b7 0 caveats \u00b7 reproducibility: C (no hardware)"}, {"axis": "Safe", "summary": "not applicable"}], "findings": [{"anchor": "F2", "url": "https://pgtrue.postgres.ai/shared/brief/3fb887ba-4a90-461d-b0be-e3156710fa67#F2", "claim": "Call a non-read-only function and you've got a write operation.", "title": "SELECT can write through a function", "explanation": "PostgreSQL 18.1 permits VOLATILE functions to modify the database. src/backend/executor/functions.c:747 rejects writing statements inside read-only SQL functions. The article correctly warns against classifying every SELECT as read-only.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/4b324845ba5d24682b9b3708a769f00d160afbd7/doc/src/sgml/xfunc.sgml#L1620-L1632", "label": "REL_18_1 \u00b7 doc/src/sgml/xfunc.sgml:1620-1632"}, {"url": "https://github.com/postgres/postgres/blob/4b324845ba5d24682b9b3708a769f00d160afbd7/src/backend/executor/functions.c#L738-L756", "label": "REL_18_1 \u00b7 src/backend/executor/functions.c:738-756"}]}, {"anchor": "F3", "url": "https://pgtrue.postgres.ai/shared/brief/3fb887ba-4a90-461d-b0be-e3156710fa67#F3", "claim": "\u2026select * from orders where customer_id = 12345\u2026", "title": "The example SELECT uses valid PostgreSQL syntax", "explanation": "The example selects all columns from orders and retains rows where customer_id equals 12345. PostgreSQL 18.1 documents these SELECT and WHERE behaviors in doc/src/sgml/queries.sgml:41 and :957.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/4b324845ba5d24682b9b3708a769f00d160afbd7/doc/src/sgml/queries.sgml#L27-L65", "label": "REL_18_1 \u00b7 doc/src/sgml/queries.sgml:27-65"}, {"url": "https://github.com/postgres/postgres/blob/4b324845ba5d24682b9b3708a769f00d160afbd7/doc/src/sgml/queries.sgml#L951-L972", "label": "REL_18_1 \u00b7 doc/src/sgml/queries.sgml:951-972"}]}, {"anchor": "F4", "url": "https://pgtrue.postgres.ai/shared/brief/3fb887ba-4a90-461d-b0be-e3156710fa67#F4", "claim": "\u2026a Go library for parsing Postgres: pg_query_go\u2026", "title": "pg_query_go provides a Go SQL parsing API", "explanation": "Multigres imports pg_query_go/v6 and invokes pg_query.Parse(query). go/common/parser/parse_benchmark_test.go:81 confirms the parsing API used for comparison.", "verdict": "Accurate", "sources": [{"url": "https://github.com/multigres/multigres/blob/0624835d578241c2e70805244937c3dd46fc44b5/go/common/parser/parse_benchmark_test.go#L25-L190", "label": "multigres@main@0624835d57 \u00b7 go/common/parser/parse_benchmark_test.go:25-190"}, {"url": "https://github.com/multigres/multigres/blob/0624835d578241c2e70805244937c3dd46fc44b5/go/common/parser/parse_benchmark_test.go#L80-L86", "label": "multigres@main@0624835d57 \u00b7 go/common/parser/parse_benchmark_test.go:80-86"}]}, {"anchor": "F5", "url": "https://pgtrue.postgres.ai/shared/brief/3fb887ba-4a90-461d-b0be-e3156710fa67#F5", "claim": "\u2026**JsonOutput** - JSON output specification ( `src/include/nodes/parsenodes.h:1751` )\u2026", "title": "JsonOutput's description and historical line reference match", "explanation": "PostgreSQL 17.0 defines JsonOutput at src/include/nodes/parsenodes.h:1751. Its comment identifies the JSON output clause.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/d7ec59a63d745ba74fba0e280bbf85dc6d1caa3e/src/include/nodes/parsenodes.h#L1747-L1792", "label": "REL_17_0 \u00b7 src/include/nodes/parsenodes.h:1747-1792"}]}, {"anchor": "F6", "url": "https://pgtrue.postgres.ai/shared/brief/3fb887ba-4a90-461d-b0be-e3156710fa67#F6", "claim": "\u2026**JsonArgument** - JSON function argument ( `src/include/nodes/parsenodes.h:1762` )\u2026", "title": "JsonArgument's description and historical line reference match", "explanation": "PostgreSQL 17.0 defines JsonArgument at src/include/nodes/parsenodes.h:1762. The struct represents an argument from a JSON PASSING clause.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/d7ec59a63d745ba74fba0e280bbf85dc6d1caa3e/src/include/nodes/parsenodes.h#L1747-L1792", "label": "REL_17_0 \u00b7 src/include/nodes/parsenodes.h:1747-1792"}]}, {"anchor": "F7", "url": "https://pgtrue.postgres.ai/shared/brief/3fb887ba-4a90-461d-b0be-e3156710fa67#F7", "claim": "\u2026**JsonFuncExpr** - JSON function expression ( `src/include/nodes/parsenodes.h:1785` )\u2026", "title": "JsonFuncExpr's description and historical line reference match", "explanation": "PostgreSQL 17.0 defines JsonFuncExpr at src/include/nodes/parsenodes.h:1785. Its comment identifies untransformed SQL/JSON query-function expressions.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/d7ec59a63d745ba74fba0e280bbf85dc6d1caa3e/src/include/nodes/parsenodes.h#L1747-L1792", "label": "REL_17_0 \u00b7 src/include/nodes/parsenodes.h:1747-1792"}]}, {"anchor": "F8", "url": "https://pgtrue.postgres.ai/shared/brief/3fb887ba-4a90-461d-b0be-e3156710fa67#F8", "claim": "\u2026**JsonTable** - JSON_TABLE ( `src/include/nodes/parsenodes.h:1821` )\u2026", "title": "JsonTable's description and historical line reference match", "explanation": "PostgreSQL 17.0 defines JsonTable at src/include/nodes/parsenodes.h:1821. The struct represents untransformed JSON_TABLE syntax.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/d7ec59a63d745ba74fba0e280bbf85dc6d1caa3e/src/include/nodes/parsenodes.h#L1817-L1835", "label": "REL_17_0 \u00b7 src/include/nodes/parsenodes.h:1817-1835"}]}, {"anchor": "F9", "url": "https://pgtrue.postgres.ai/shared/brief/3fb887ba-4a90-461d-b0be-e3156710fa67#F9", "claim": "NodeList itself also implements Node\u2026", "title": "NodeList provides the node abstraction that []Node lacks", "explanation": "go/common/parser/ast/nodes.go:957 defines NodeList with an embedded BaseNode and []Node items. Pointer methods supply String and SqlString. A bare []Node lacks the methods required by Node.", "verdict": "Accurate", "sources": [{"url": "https://github.com/multigres/multigres/blob/0624835d578241c2e70805244937c3dd46fc44b5/go/common/parser/ast/nodes.go#L890-L910", "label": "multigres@main@0624835d57 \u00b7 go/common/parser/ast/nodes.go:890-910"}, {"url": "https://github.com/multigres/multigres/blob/0624835d578241c2e70805244937c3dd46fc44b5/go/common/parser/ast/nodes.go#L950-L990", "label": "multigres@main@0624835d57 \u00b7 go/common/parser/ast/nodes.go:950-990"}]}, {"anchor": "F10", "url": "https://pgtrue.postgres.ai/shared/brief/3fb887ba-4a90-461d-b0be-e3156710fa67#F10", "claim": "The Postgres source tree includes extensive SQL test files in src/test/regress/sql/\u2026", "title": "PostgreSQL regression SQL exists at the stated path", "explanation": "src/test/regress/sql/constraints.sql contains SQL regression cases. Multigres documents converted PostgreSQL regression queries in go/common/parser/testdata/postgres/README.md:3.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/4b324845ba5d24682b9b3708a769f00d160afbd7/src/test/regress/sql/constraints.sql#L37-L52", "label": "REL_18_1 \u00b7 src/test/regress/sql/constraints.sql:37-52"}, {"url": "https://github.com/multigres/multigres/blob/0624835d578241c2e70805244937c3dd46fc44b5/go/common/parser/testdata/postgres/README.md#L1-L60", "label": "multigres@main@0624835d57 \u00b7 go/common/parser/testdata/postgres/README.md:1-60"}]}, {"anchor": "F11", "url": "https://pgtrue.postgres.ai/shared/brief/3fb887ba-4a90-461d-b0be-e3156710fa67#F11", "claim": "Some were tests that were supposed to fail, checking that invalid syntax was rejected.", "title": "Regression tests include SQL intended to fail parsing", "explanation": "PostgreSQL 18.1 labels syntax-error cases in src/test/regress/sql/constraints.sql:42. One case includes an extraneous comma in a DEFAULT expression.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/4b324845ba5d24682b9b3708a769f00d160afbd7/src/test/regress/sql/constraints.sql#L37-L52", "label": "REL_18_1 \u00b7 src/test/regress/sql/constraints.sql:37-52"}]}, {"anchor": "F12", "url": "https://pgtrue.postgres.ai/shared/brief/3fb887ba-4a90-461d-b0be-e3156710fa67#F12", "claim": "That's 2.5x faster\u2026", "title": "The reported suite timings support the 2.5\u00d7 ratio", "explanation": "The displayed suite timings imply 2.52\u00d7 (derived: 366 ms / 145 ms). That rounds to 2.5\u00d7. We checked the arithmetic, not the elapsed times.", "verdict": "Accurate", "sources": []}, {"anchor": "F13", "url": "https://pgtrue.postgres.ai/shared/brief/3fb887ba-4a90-461d-b0be-e3156710fa67#F13", "claim": "\u2026Simple SELECT 1.6\u03bcs 3.1\u03bcs\u2026", "title": "The simple SELECT timings support the rounded 2\u00d7 ratio", "explanation": "The simple SELECT timings imply 1.94\u00d7 (derived: 3.1 \u03bcs / 1.6 \u03bcs). That rounds to 2\u00d7.", "verdict": "Accurate", "sources": []}]}