table types/check constraints

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "PostgreSQL Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: table types/check constraints
Date: 2008-12-12 14:14:32
Message-ID: b42b73150812120614q15e75672i7239e88948725b4e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

In my gripe/suggestion here:
http://archives.postgresql.org/pgsql-hackers/2008-12/msg00642.php

I noted that it might be nice to handle check constraints over
composite types. It turns out that table check constraints are not
enforced during casts:

postgres=# create table foo(f1 int, f2 int, check(f1 != f2));
postgres=# select (1,1)::foo;
row
-------
(1,1)
(1 row)

Should the be? I've been thinking about how to marry tables and
composite types.

merlin

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2008-12-12 14:14:45 Re: WIP: default values for function parameters
Previous Message Pavel Stehule 2008-12-12 14:12:59 Re: WIP: default values for function parameters