Re: simple problem

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Daniel Ordobas Bortolas <bortolas(at)inf(dot)UFSM(dot)br>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: simple problem
Date: 2002-03-06 18:20:42
Message-ID: 20020306101854.E8417-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2002-03-06 19:23:34 Re: SELECT currval within a transaction
Previous Message Frank Joerdens 2002-03-06 17:01:57 SELECT currval within a transaction