Search Postgresql Archives

Re: partial "on-delete set null" constraint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Your main problem is that column "domain" of mailboxes is specified as NOT NULL, so of course the "SET NULL" option will not work.

Here is the full message I see when I execute your code, which should
be self explanatory.

ERROR:  null value in column "domain" violates not-null constraint
DETAIL:  Failing row contains (null, null, Hello).
CONTEXT:  SQL statement "UPDATE ONLY "public"."mailboxes" SET "username" = NULL, "domain" = NULL WHERE $1 OPERATOR(pg_catalog.=) "username" AND $2 OPERATOR(pg_catalog.=) "domain""
********** Error **********

ERROR: null value in column "domain" violates not-null constraint
SQL state: 23502
Detail: Failing row contains (null, null, Hello).
Context: SQL statement "UPDATE ONLY "public"."mailboxes" SET "username" = NULL, "domain" = NULL WHERE $1 OPERATOR(pg_catalog.=) "username" AND $2 OPERATOR(pg_catalog.=) "domain""

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux