SQLite User Forum

quoted constraint names with embedded quotes can become effectively undroppable via DROP CONSTRAINT
Login

quoted constraint names with embedded quotes can become effectively undroppable via DROP CONSTRAINT

(1.1) By Pavan Nambi (Pavan-Nambi) on 2026-04-21 17:42:29 edited from 1.0 [source]

  CREATE TABLE t(a INT);
  ALTER TABLE t ADD CONSTRAINT "s""s" CHECK(a>0);
  ALTER TABLE t DROP CONSTRAINT "s""s";

errors with no such constraint: "s""s"

similar to this but embedded quotes.

i am assuming this below behaviour is by design!? as there appears to be tests for this on HEAD(please correct me if i am wrong.)

create table t(a int,constraint "test");
alter table drop constraint "test"; 

EDIT:sorry about the edit if anyone got notified. i didn't knew that if i write a statement right after quotes its not visible..

thanks.

(2) By Pavan Nambi (Pavan-Nambi) on 2026-04-21 19:17:10 in reply to 1.1 [link] [source]

this is fixed in https://github.com/sqlite/sqlite/commit/c3b52dff5360c3daa8abb399be9113552bf70c7f#diff-3dedbc72ef9c0596a94f3997dc4b74e4dc20b7ff33aecfd04275a29710665244

thanks!