From: | Alexander Farber <alexander(dot)farber(at)gmail(dot)com> |
---|---|
To: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Syntax error at or near “on” |
Date: | 2013-07-14 11:04:36 |
Message-ID: | CAADeyWhFFUyWdXWrE44tqbYeW=v+Ca4Ekfh-W5_4+v7f4UcK-Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello!
In PostgreSQL 8.4.13 why do I please get the syntax error
ERROR: syntax error at or near "on"
LINE: ... references balkan_users(id) check (id <> author) on delete ...
for the following 2 statements?
create table balkan_users (
id varchar(32) primary key,
first_name varchar(64) not null,
last_name varchar(64),
female boolean,
avatar varchar(128),
city varchar(64),
mobile varchar(64),
login timestamp default current_timestamp,
logout timestamp,
last_ip inet,
vip timestamp,
mail varchar(256),
green integer,
red integer,
medals integer not null default 0
);
create table balkan_rep (
rep_id serial,
id varchar(32) references balkan_users(id) check (id <>
author) on delete cascade,
author varchar(32) references balkan_users(id) on delete cascade,
author_ip inet,
nice boolean,
about varchar(256),
stamp timestamp default current_timestamp,
primary key(id, author);
);
Thank you!
Alex
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Farber | 2013-07-14 11:28:02 | Re: Syntax error at or near “on” |
Previous Message | Vincenzo Romano | 2013-07-14 11:03:18 | Re: Update big table |