On Sat, Mar 11, 2017 at 11:52 AM, Alban Hertroys <haramrae@gmail.com> wrote:
> On 11 Mar 2017, at 10:41, Alexander Farber <alexander.farber@gmail.com> wrote: > uid integer NOT NULL REFERENCES words_users(uid) CHECK (uid <> author) ON DELETE CASCADE,
You put your CHECK constraint definition smack in the middle of the FK constraint definition, which starts with REFERENCES and ends with the delete CASCADE.