Najm Hashmi writes:
> cmdb=# create table media_received (
> cmdb(# comp_id not null,
> cmdb(# dept_id not null, ^
Those two fields should have a data type. Same in your other examples.
> cmdb(# date_rec timestamp default 'now',
> cmdb(# units int4 default 0,
> cmdb(# media_type varchar(64),
> cmdb(# enqued int4 check (enqued=<units),
> cmdb(# encoded int4 check(encoded=<enqued),
> cmdb(# insys int4 check(insys=<encoded),
> cmdb(# constraint media_rec_pk primary key(comp_id,dept_id,date_rec),
> cmdb(# constraint media_dept_fk foreign key(dept_id) references department,
> cmdb(# constraint media_comp_fk foreign key(comp_id) references company
> cmdb(# );
> ERROR: parser: parse error at or near "not"
--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/