Re: simple problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 20:06:39
Message-ID: 25416.1015445199@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Daniel Ordobas Bortolas" <bortolas(at)inf(dot)UFSM(dot)br> writes:
> -->create table loco( id_loco int4 not null, primary key (id_loco), check(
> (select count(*) from loco ) < 3 ) );
> ->insert into loco values(1);
> the result is: ERROR: ExecEvalExpr: unknown expression type 108

Subselects aren't supported in check constraints (and if you were
running a version newer than 7.0.*, it would've told you so ...)

Possibly you could do what you want with a trigger function.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message PG Explorer 2002-03-06 20:13:45 Re: simple problem
Previous Message Hano de la Rouviere 2002-03-06 19:34:03 Re: simple problem