Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id DA1A8476ECD for ; Wed, 6 Mar 2002 13:20:54 -0500 (EST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 1B4EBD5FA; Wed, 6 Mar 2002 10:20:42 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 10D4B5BFD; Wed, 6 Mar 2002 10:20:42 -0800 (PST) Date: Wed, 6 Mar 2002 10:20:42 -0800 (PST) From: Stephan Szabo To: Daniel Ordobas Bortolas Cc: Subject: Re: simple problem In-Reply-To: <20020306150845.39034.qmail@inf.ufsm.br> Message-ID: <20020306101854.E8417-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200203/67 X-Sequence-Number: 6949 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.