René's URL Explorer Experiment


Title: [BUG] PostgreSQL: ALTER TABLE ... ADD CONSTRAINT with DEFERRABLE INITIALLY DEFERRED / NOT VALID does not parse · Issue #2850 · JSQLParser/JSqlParser · GitHub

Open Graph Title: [BUG] PostgreSQL: ALTER TABLE ... ADD CONSTRAINT with DEFERRABLE INITIALLY DEFERRED / NOT VALID does not parse · Issue #2850 · JSQLParser/JSqlParser

X Title: [BUG] PostgreSQL: ALTER TABLE ... ADD CONSTRAINT with DEFERRABLE INITIALLY DEFERRED / NOT VALID does not parse · Issue #2850 · JSQLParser/JSqlParser

Description: These statements are valid in PostgreSQL. pg_dump writes the first one for every deferrable foreign key. CREATE TABLE accepts the same constraint attributes, ALTER TABLE ... ADD CONSTRAINT does not. JSqlParser: current master (90ac3a7), ...

Open Graph Description: These statements are valid in PostgreSQL. pg_dump writes the first one for every deferrable foreign key. CREATE TABLE accepts the same constraint attributes, ALTER TABLE ... ADD CONSTRAINT does not...

X Description: These statements are valid in PostgreSQL. pg_dump writes the first one for every deferrable foreign key. CREATE TABLE accepts the same constraint attributes, ALTER TABLE ... ADD CONSTRAINT does not...

Opengraph URL: https://github.com/JSQLParser/JSqlParser/issues/2850

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG] PostgreSQL: ALTER TABLE ... ADD CONSTRAINT with DEFERRABLE INITIALLY DEFERRED / NOT VALID does not parse","articleBody":"These statements are valid in PostgreSQL. `pg_dump` writes the first one for every deferrable foreign key. `CREATE TABLE` accepts the same constraint attributes, `ALTER TABLE ... ADD CONSTRAINT` does not.\r\n\r\nJSqlParser: current `master` (90ac3a7), JDK 25.\r\n\r\n```java\r\nCCJSqlParserUtil.parse(\"ALTER TABLE ONLY public.t ADD CONSTRAINT t_fk FOREIGN KEY (a_id) REFERENCES public.a(id) DEFERRABLE INITIALLY DEFERRED\");\r\n```\r\n\r\n| Statement | Result |\r\n|---|---|\r\n| `ALTER TABLE t ADD CONSTRAINT fk FOREIGN KEY (a) REFERENCES u (id) DEFERRABLE` | parses |\r\n| `... FOREIGN KEY (a) REFERENCES u (id) DEFERRABLE INITIALLY DEFERRED` | `Encountered: \u003cS_IDENTIFIER> / \"INITIALLY\"` |\r\n| `... FOREIGN KEY (a) REFERENCES u (id) INITIALLY IMMEDIATE` | `Encountered: \u003cS_IDENTIFIER> / \"INITIALLY\"` |\r\n| `ALTER TABLE t ADD CONSTRAINT t_uq UNIQUE (a) DEFERRABLE INITIALLY DEFERRED` | `Encountered: \"INITIALLY\"` |\r\n| `ALTER TABLE t ADD CONSTRAINT t_pk PRIMARY KEY (a) DEFERRABLE INITIALLY IMMEDIATE` | `Encountered: \"INITIALLY\"` |\r\n| `ALTER TABLE t ADD CONSTRAINT t_ck CHECK (a > 0) NOT VALID` | `Encountered: \u003cK_NOT> / \"NOT\"` |\r\n| `ALTER TABLE t ADD FOREIGN KEY (a) REFERENCES u (id) DEFERRABLE INITIALLY DEFERRED` | `Encountered: \u003cK_DEFERRABLE> / \"DEFERRABLE\"` (without `CONSTRAINT name`, even plain `DEFERRABLE` fails) |\r\n| `CREATE TABLE t (a int, CONSTRAINT fk FOREIGN KEY (a) REFERENCES u (id) DEFERRABLE INITIALLY DEFERRED)` | parses |\r\n\r\nThe `CREATE TABLE` path goes through `PostgreSqlConstraintAttributeList` (the `INITIALLY` and `NOT VALID` handling in `JSqlParserCC.jjt`). The `ALTER TABLE ... ADD` production seems not to call it for all constraint kinds.\r\n\r\nFound while checking a list of about 200 statements against `master`. Most of them parsed and round-tripped.\r\n","author":{"url":"https://github.com/ItsDeadlyProgrammer","@type":"Person","name":"ItsDeadlyProgrammer"},"datePublished":"2026-10-23T05:39:30Z","url":"https://github.com/JSQLParser/JSqlParser/issues/2850"}

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/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:1f45b0d2-6620-066d-13c3-d625667b7042
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8B4A:3A6B0F:9394D5:D0C76C:6B042EAF
html-safe-nonce053bb2214a910bffec8579ee778cd64597c3c6ea3e4806467ccfec67b948ee09
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QjRBOjNBNkIwRjo5Mzk0RDU6RDBDNzZDOjZCMDQyRUFGIiwidmlzaXRvcl9pZCI6IjEyMjEzNjIwMTIxMjc1MDYwOTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac960752b90413f68b8ced4e20b292c83e19725a779fc0d4229be031ad359a2afa
hovercard-subject-tagissue:5992558327
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JSQLParser/JSqlParser/2850/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f81685838219b991b32e12e9413ad30856d79f53e6e0865bebc0b8ac9cc8f25e/JSQLParser/JSqlParser/issues/2850
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f81685838219b991b32e12e9413ad30856d79f53e6e0865bebc0b8ac9cc8f25e/JSQLParser/JSqlParser/issues/2850
og:image:altThese statements are valid in PostgreSQL. pg_dump writes the first one for every deferrable foreign key. CREATE TABLE accepts the same constraint attributes, ALTER TABLE ... ADD CONSTRAINT does not...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameItsDeadlyProgrammer
hostnamegithub.com
expected-hostnamegithub.com
Noneb7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e
turbo-cache-controlno-preview
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasec3dd496c3da6ea6b77e69c09279d2b81604654f1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/JSQLParser/JSqlParser/issues/2850#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJSQLParser%2FJSqlParser%2Fissues%2F2850
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%2Fissues%2F2850
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=JSQLParser%2FJSqlParser
Reloadhttps://github.com/JSQLParser/JSqlParser/issues/2850
Reloadhttps://github.com/JSQLParser/JSqlParser/issues/2850
Reloadhttps://github.com/JSQLParser/JSqlParser/issues/2850
JSQLParserhttps://github.com/JSQLParser
JSqlParserhttps://github.com/JSQLParser/JSqlParser
Codehttps://github.com/JSQLParser/JSqlParser
Issues2 (2)https://github.com/JSQLParser/JSqlParser/issues
Pull requests3 (3)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
https://github.com/JSQLParser/JSqlParser
New issuehttps://github.com/login?return_to=https://github.com/JSQLParser/JSqlParser/issues/2850
New issuehttps://github.com/login?return_to=https://github.com/JSQLParser/JSqlParser/issues/2850
[BUG] PostgreSQL: ALTER TABLE ... ADD CONSTRAINT with DEFERRABLE INITIALLY DEFERRED / NOT VALID does not parsehttps://github.com/JSQLParser/JSqlParser/issues/2850#top
https://github.com/ItsDeadlyProgrammer
ItsDeadlyProgrammerhttps://github.com/ItsDeadlyProgrammer
on Oct 23, 2026https://github.com/JSQLParser/JSqlParser/issues/2850#issue-5992558327
90ac3a7https://github.com/JSQLParser/JSqlParser/commit/90ac3a79bb2ecbd6ba7fb9076c7a044392b63a4c
https://github.com/hutiefang76
hutiefang76https://github.com/hutiefang76
on Oct 24, 2026https://github.com/JSQLParser/JSqlParser/issues/2850#issuecomment-6377366956
#2612https://github.com/JSQLParser/JSqlParser/pull/2612
https://github.com/ItsDeadlyProgrammer
ItsDeadlyProgrammerhttps://github.com/ItsDeadlyProgrammer
on Oct 24, 2026https://github.com/JSQLParser/JSqlParser/issues/2850#issuecomment-6378915432
https://github.com/manticore-projects
manticore-projectshttps://github.com/manticore-projects
on Nov 13, 2026https://github.com/JSQLParser/JSqlParser/issues/2850#issuecomment-6841295856
Sign up for freehttps://github.com/signup?return_to=https://github.com/JSQLParser/JSqlParser/issues/2850
Sign in to commenthttps://github.com/login?return_to=https://github.com/JSQLParser/JSqlParser/issues/2850
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-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.