René's URL Explorer Experiment


Title: Allow more MySQL and PostgreSQL keywords as unquoted identifiers by minleejae · Pull Request #2815 · JSQLParser/JSqlParser · GitHub

Open Graph Title: Allow more MySQL and PostgreSQL keywords as unquoted identifiers by minleejae · Pull Request #2815 · JSQLParser/JSqlParser

X Title: Allow more MySQL and PostgreSQL keywords as unquoted identifiers by minleejae · Pull Request #2815 · JSQLParser/JSqlParser

Description: Purpose Allow keywords that MySQL 8.4 and PostgreSQL 18 accept as unquoted column and table names. A sweep of MySQL's non-reserved words and PostgreSQL's unreserved and column-name keywords, each used as a column in CREATE TABLE, in ALTER TABLE ... ADD COLUMN and as a table name, found 38 statements that fail and 26 CREATE TABLE (...) statements that silently become an UnsupportedStatement. Each server accepts the words of its own list, for example: -- MySQL 8.4 CREATE TABLE t (current INT, only INT, returning INT, sql_no_cache INT); ALTER TABLE t ADD COLUMN offset INT; CREATE TABLE value (a INT); -- PostgreSQL 18 CREATE TABLE t (prior int, unknown int, between int, xmlserialize int, p path); ALTER TABLE t ADD COLUMN set int; Current design (As-is) ABSENT, CURRENT, FORCE, IMPORT, PRIOR, SQL_NO_CACHE, UNBOUNDED, UNKNOWN and XMLSERIALIZE are reserved, although each one only starts a clause in a few places. BETWEEN, FULL, ONLY and RETURNING are reserved and are not in the list of reserved words that RelObjectName() accepts in name positions (like LEFT, ORDER, SET, VALUE). Those listed words are only names after a delimiter, after a clause keyword or before a safe follower. After TABLE or COLUMN, CREATE TABLE value (a INT) and ADD COLUMN offset INT fail; for CREATE TABLE the statement falls back to an UnsupportedStatement. A CREATE TABLE element that starts with EXCLUDE is always read as an exclusion constraint, so a column named exclude fails. ColDataType() does not accept the PATH token, so PostgreSQL's geometric type path fails. keywords.rst still lists EXISTS, EXTEND, SAMPLE and STATEMENT, which #2706, #2773 and #2774 made non-reserved. Target design (To-be) Non-reserved words, moved into NonReservedWord() (as in #2793). Each keeps its keyword use through these guards: PRIOR is Oracle's operator only when an operand follows (PRIOR id, PRIOR (a), PRIOR 2), not in prior = 1, prior IS NULL or ORDER BY prior DESC. SQL_NO_CACHE is a MySQL select modifier only before a select item. FORCE INDEX|KEY (...) is an index hint, never an implicit alias. UNBOUNDED PRECEDING|FOLLOWING, XMLSERIALIZE ( and ABSENT ON NULL keep their meaning. current.x is a qualified column. CURRENT alone stays a TimeKeyExpression as before. Reserved words that are names in name positions: BETWEEN, FULL, ONLY and RETURNING are added to that list in RelObjectName(). They start clauses after an expression or a table, so they stay reserved: FULL follows the LEFT/RIGHT rule. It is an implicit alias unless a join follows, so FROM t full works and FROM a FULL JOIN b is unchanged. BETWEEN, ONLY and RETURNING are never implicit aliases (AS still works). ONLY before a relation name after FROM, JOIN, UPDATE, INTO, USING or , is PostgreSQL's inheritance prefix. Forms that are still unsupported, such as DELETE FROM ONLY t or JOIN ONLY t, fail as before instead of naming a table only. JSON_ARRAY(RETURNING JSON) and JSON_OBJECT(ABSENT ON NULL) keep their clauses. A word after TABLE or COLUMN is always a name. IF [NOT] EXISTS and ONLY are matched before the name, as before. EXCLUDE starts an exclusion constraint only before USING, ( or WHERE. PATH is accepted as a column type, but not as the type of a JSON_TABLE column, where it introduces the path. NonReservedWord() is split into two productions: At master, the lookahead routine that JavaCC generates for the single choice of 425 words has 7,951 bytes of bytecode. 9 more words take it to 8,122 bytes, above the JVM's 8,000 byte limit for JIT compilation (-XX:HugeMethodLimit), so it would always run interpreted. Measured, that cost about 5% on the benchmark below. With the split, the largest routine has 4,222 bytes. The token kinds stay between the MIN_NON_RESERVED_WORD/MAX_NON_RESERVED_WORD sentinels. Two optional guards became choices (PRIOR before a condition and the SQL_NO_CACHE modifier). JavaCC does not evaluate a semantic lookahead on [...] or (...)* while it scans an enclosing syntactic lookahead, and a choice keeps that guard. keywords.rst is regenerated with updateKeywords. 88 words are reserved (was 100) and 434 non-reserved (was 425). Not changed ALTER TABLE t ADD offset INT without COLUMN still fails for the listed reserved words. Clause keywords, such as IF NOT EXISTS, also follow ADD. DROP COLUMN and RENAME COLUMN read the column with KeywordOrIdentifier(), which accepts only a short fixed list of words. That is left to the ALTER column work. After a comma, ONLY followed by an unquoted identifier is read as the relation prefix. So CREATE TABLE t (a INT, only serial) still fails, and (only serial) or (a INT, only INT) parse. Validation KeywordsTest: 1,015 cases. 72 are new. 66 of them cover 22 words in the default, MySQL and PostgreSQL dialects: a column in CREATE TABLE and in ADD COLUMN; a CREATE TABLE name; select list, qualified column, alias, WHERE and ORDER BY; FROM, UPDATE ... SET and an INSERT column list. Each case is parsed, deparsed and reparsed, and the AST names are checked. 6 more tests check the AST of the clauses that use these words. 18 cases come from the 9 new non-reserved words in the existing per-keyword tests. Java 17 offline Gradle spotlessApply check: 10,442 tests, 10,417 passed, 25 skipped, zero failures/errors. The grammar choice conflict check reports no warnings. About 260 statements around these words were parsed in the default, MySQL and PostgreSQL dialects, and most of them also in the Oracle dialect. They cover the keyword uses (joins, index hints, RETURNING, JSON functions, window frames, Oracle CONNECT BY, PostgreSQL ONLY, EXCLUDE constraints, IF [NOT] EXISTS) and the identifier uses. The statement type and the rendered SQL match master, except for the identifier uses that now parse. In the keyword sweep, all 1,482 distinct MySQL and 1,179 PostgreSQL statements now parse as CreateTable/Alter, with no UnsupportedStatement left. The path column type statements also parse. The other corpus statements are unchanged. Performance: Benchmark: all 321 .sql test resources parsed in the calling thread, thread CPU time, 40 rounds per JVM, 10 alternating JVM pairs against master. Median best round: 69.6 ms on master and 69.9 ms with this change. Median of the per-run medians: 90.3 ms and 89.8 ms. This change was faster in 4 of 10 pairs. Lookahead work on the same corpus: token scans +1.3% and syntactic lookahead calls -2.4%. MySQL 8.4 and PostgreSQL 18.3: every corpus statement this branch parses ran as written on one server and as rendered by toString() on a second, identical server, in the same order. All 205 MySQL and 328 PostgreSQL statements give the same result (success, or the same error). Integration validation Applied #2806–#2819 together on master (bdf8ac31), with the stacked PRs on top of their bases (#2806 → #2807 → #2808, #2806 → #2809 → #2810 and #2811 → #2812). Each branch merges cleanly into master. Between the branches, conflicts are limited to adjacent additions (README/index rows, usage sections, imports, visitor and feature lists, one enum line and one alias guard). The integrated build passes Java 17 offline Gradle spotlessApply check: 11,494 tests, 11,469 passed, 25 skipped, zero failures/errors. The grammar choice conflict check passes. On a corpus of 635 MySQL 8.4 and PostgreSQL 18 DDL/DCL statements, each accepted by the server, the integrated build parses 265 of 271 MySQL statements (master: 206) and 363 of 364 PostgreSQL statements (master: 328). Every MySQL 8.4 non-reserved word and PostgreSQL 18 unreserved or column-name keyword parses as a column and table name. On paired MySQL 8.4 and PostgreSQL 18.3 servers, all 263 MySQL and 362 PostgreSQL statements rendered by the integrated build give the same results as the originals.

Open Graph Description: Purpose Allow keywords that MySQL 8.4 and PostgreSQL 18 accept as unquoted column and table names. A sweep of MySQL's non-reserved words and PostgreSQL's unreserved and column-name keywords...

X Description: Purpose Allow keywords that MySQL 8.4 and PostgreSQL 18 accept as unquoted column and table names. A sweep of MySQL's non-reserved words and PostgreSQL's unreserved and column-name ...

Opengraph URL: https://github.com/JSQLParser/JSqlParser/pull/2815

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.4

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:f6a3122a-5d7d-a765-e8fa-0e0fef6cf69e
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idAFBC:2DB625:98D076:D4AC75:6B0484F6
html-safe-nonce5d1772e4e5ff7a832beb5c451ceac79485a727f60eda4b48a4651fe54b1e5777
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRkJDOjJEQjYyNTo5OEQwNzY6RDRBQzc1OjZCMDQ4NEY2IiwidmlzaXRvcl9pZCI6IjcwNTM2NDY1ODAzODUzNTA5MDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac3af66972ee2a7f17a1c8634022ccffcef6c1fbcda0e2390063c5be1911d59306
hovercard-subject-tagpull_request:4854551323
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/JSQLParser/JSqlParser/pull/2815/files
twitter:imagehttps://avatars.githubusercontent.com/u/55116920?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/55116920?s=400&v=4
og:image:altPurpose Allow keywords that MySQL 8.4 and PostgreSQL 18 accept as unquoted column and table names. A sweep of MySQL's non-reserved words and PostgreSQL's unreserved and column-name keywords...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None1d5c152376e38b7d2e37f3d5179be29a73bee93b85110da28a4eebe1159cdc70
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/JSQLParser/JSqlParser git https://github.com/JSQLParser/JSqlParser.git
octolytics-dimension-user_id4643847
octolytics-dimension-user_loginJSQLParser
octolytics-dimension-repository_id1944709
octolytics-dimension-repository_nwoJSQLParser/JSqlParser
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1944709
octolytics-dimension-repository_network_root_nwoJSQLParser/JSqlParser
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef5017e8ff4ea25a8011fcf0f2a0e430c60dc86c8
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/JSQLParser/JSqlParser/pull/2815/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJSQLParser%2FJSqlParser%2Fpull%2F2815%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJSQLParser%2FJSqlParser%2Fpull%2F2815%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=JSQLParser%2FJSqlParser
Reloadhttps://github.com/JSQLParser/JSqlParser/pull/2815/files
Reloadhttps://github.com/JSQLParser/JSqlParser/pull/2815/files
Reloadhttps://github.com/JSQLParser/JSqlParser/pull/2815/files
JSQLParserhttps://github.com/JSQLParser
JSqlParserhttps://github.com/JSQLParser/JSqlParser
Codehttps://github.com/JSQLParser/JSqlParser
Issues2 (2)https://github.com/JSQLParser/JSqlParser/issues
Pull requests2 (2)https://github.com/JSQLParser/JSqlParser/pulls
Discussionshttps://github.com/JSQLParser/JSqlParser/discussions
Actionshttps://github.com/JSQLParser/JSqlParser/actions
Projectshttps://github.com/JSQLParser/JSqlParser/projects
Wikihttps://github.com/JSQLParser/JSqlParser/wiki
Security and qualityhttps://github.com/JSQLParser/JSqlParser/security
Insightshttps://github.com/JSQLParser/JSqlParser/insights
Sign up for GitHub https://github.com/signup?return_to=%2FJSQLParser%2FJSqlParser%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FJSQLParser%2FJSqlParser%2Fissues%2Fnew%2Fchoose
manticore-projectshttps://github.com/manticore-projects
JSQLParser:masterhttps://github.com/JSQLParser/JSqlParser/tree/master
minleejae:fix/keywords-as-identifiers-20261014https://github.com/minleejae/JSqlParser/tree/fix/keywords-as-identifiers-20261014
Conversation 0 https://github.com/JSQLParser/JSqlParser/pull/2815
Commits 1 https://github.com/JSQLParser/JSqlParser/pull/2815/commits
Checks 19 https://github.com/JSQLParser/JSqlParser/pull/2815/checks
Files changed https://github.com/JSQLParser/JSqlParser/pull/2815/files
Please reload this pagehttps://github.com/JSQLParser/JSqlParser/pull/2815/files
Allow more MySQL and PostgreSQL keywords as unquoted identifiers https://github.com/JSQLParser/JSqlParser/pull/2815/files#top
Show all changes 1 commit https://github.com/JSQLParser/JSqlParser/pull/2815/files
86fd17f fix: allow more MySQL and PostgreSQL keywords as unquoted identifiers minleejae Oct 14, 2026 https://github.com/JSQLParser/JSqlParser/pull/2815/commits/86fd17f6beef574e7bbb8a15a302620081c66513
Clear filters https://github.com/JSQLParser/JSqlParser/pull/2815/files
Please reload this pagehttps://github.com/JSQLParser/JSqlParser/pull/2815/files
Please reload this pagehttps://github.com/JSQLParser/JSqlParser/pull/2815/files
JSqlParserCC.jjt https://github.com/JSQLParser/JSqlParser/pull/2815/files#diff-d323df58a0300a038ac87b328bf05b8255ff06e6b5d0e9aeae641fa566e4068c
keywords.rst https://github.com/JSQLParser/JSqlParser/pull/2815/files#diff-4b2ad3acdcffbe3e209bf6213eede936f6440f7b58c0cf23be005565c1d22b3b
KeywordsTest.java https://github.com/JSQLParser/JSqlParser/pull/2815/files#diff-c05162cd0932c6170f1975806e20dc280019ba0f96d26a56b313b4d237509b17
Please reload this pagehttps://github.com/JSQLParser/JSqlParser/pull/2815/files
Please reload this pagehttps://github.com/JSQLParser/JSqlParser/pull/2815/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.