Menu

#1749 DEFERRABLE constraints don't work

current-release
open
nobody
None
5
2026-06-11
2026-06-10
Lukas Eder
No

The manual documents standard SQL deferrable constraints:
https://hsqldb.org/doc/guide/databaseobjects-chapt.html

But they don't work:

create table t (i int);
alter table t add unique (i) deferrable;

This just raises an error:

SQL Error [42581]: unexpected token: DEFERRABLE

Discussion

  • Lukas Eder

    Lukas Eder - 2026-06-10

    Well, the manual says "HyperSQL does not support deferring constraint enforcement.", but I don't see the point of documenting the syntax and explaining it if it's not supported...

     
  • Fred Toussi

    Fred Toussi - 2026-06-10

    We may support them at some point. BTW, please test with the Release Candidate jar and report any regression. https://sourceforge.net/projects/hsqldb/files/release_candidate/

     
    • Lukas Eder

      Lukas Eder - 2026-06-11

      Sure, but I wonder what's the point of completely documenting the (potentially future) syntax if it's simply not supported? Or, perhaps, instead of just failing in the parser, you could parse the syntax and throw a "not yet supported" exception of sorts. Some RDBMS do this, e.g. CockroachDB, YugabyteDB, especially when it's about a PostgreSQL syntax that they don't support yet. They usually include a link to an issue in the issue tracker that helps provide feedback and gauge interest.

      Sure, I'll check out the release candidate.

       
  • Fred Toussi

    Fred Toussi - 2026-06-11

    Good suggestion about "not yet supported". But the feature is in the syntax diagram because it is less work than adding it later.

     

Log in to post a comment.

Auth0 Logo