On Wed, 6 Mar 2002, Daniel Ordobas Bortolas wrote:
>
> Hello!
> I am having problems creating a table and i'd like some help.
>
> -->create table loco( id_loco int4 not null, primary key (id_loco), check(
> (select count(*) from loco ) < 3 ) );
IIRC, check constraints with subselects are not currently supported.
You can make triggers that do the check for you.