Thank you Alban and Francisco -
On Sat, Mar 11, 2017 at 11:52 AM, Alban Hertroys wrote:
>
> > On 11 Mar 2017, at 10:41, Alexander Farber
> wrote:
> > uid integer NOT NULL REFERENCES words_users(uid) CHECK (uid <>
> author) ON DELETE CASCADE,
>
>
> You put your CHECK constraint definitio
> On 11 Mar 2017, at 10:41, Alexander Farber wrote:
>
> uid integer NOT NULL REFERENCES words_users(uid) CHECK (uid <>
> author) ON DELETE CASCADE,
> but get syntax error in 9.5:
>
> ERROR: syntax error at or near "ON"
> LINE 2: ...REFERENCES words_users(uid) CHECK (uid <> author) O
Alexander:
On Sat, Mar 11, 2017 at 10:41 AM, Alexander Farber
wrote:
> uid integer NOT NULL REFERENCES words_users(uid) CHECK (uid <>
> author) ON DELETE CASCADE,
Maybe a stupid question, but have you tried "refereces.. on delete .. check"?
I mean, the manual for create table says:
>>
Good morning,
I am trying to add a table holding player reviews of each other:
words=> CREATE TABLE words_reviews (
uid integer NOT NULL REFERENCES words_users(uid) CHECK (uid <>
author) ON DELETE CASCADE,
author integer NOT NULL REFERENCES words_users(uid) ON DELETE
CASCADE,