CONSTRAINT problems - Mailing list pgsql-bugs

From Michael Richards
Subject CONSTRAINT problems
Date
Msg-id 3A5D03C7.000011.86746@frodo.searchcanada.ca
Whole thread Raw
List pgsql-bugs
I've got a test table in 7.0.3 where I'm implementing a directory
type structure in a RCS type system. I have a check to ensure that
there are no duplicate filenames within for a specific directory
given the revisionid of 0 (means it's the current revision rather
than a historical one).

CREATE TABLE test (
  id int4 primary key,
  name VARCHAR(20),
  revision int4 default 0,
  directoryid int4,
  CONSTRAINT dupename CHECK (NOT EXISTS (SELECT name FROM test as o
WHERE o.name!=name AND revision=0))
);
CREATE
insert into test values (1,'test','0',NULL);
ERROR:  ExecEvalExpr: unknown expression type 108

-Michael
_________________________________________________________________
     http://fastmail.ca/ - Fast Free Web Email for Canadians

pgsql-bugs by date:

Previous
From: pgsql-bugs@postgresql.org
Date:
Subject: JDBC Connection must be restarted after executing SQL statement that calls a PL/PGSQL function that won't compile
Next
From: Stephan Szabo
Date:
Subject: Re: CONSTRAINT problems