Re: Using SUBSELECT in CHECK expressions - Mailing list pgsql-general

From Tom Lane
Subject Re: Using SUBSELECT in CHECK expressions
Date
Msg-id 3555.1068055924@sss.pgh.pa.us
Whole thread Raw
In response to Re: Using SUBSELECT in CHECK expressions  (Michael Glaesemann <grzm@myrealbox.com>)
Responses Re: Using SUBSELECT in CHECK expressions  (Michael Glaesemann <grzm@myrealbox.com>)
List pgsql-general
Michael Glaesemann <grzm@myrealbox.com> writes:
> On Thursday, November 6, 2003, at 02:38 AM, Tom Lane wrote:
>> IIRC we check that it is labeled IMMUTABLE.

> Thanks for the clarification. Is this in the documentation somewhere?

[digs...] No, because my recollection is wrong: there's no such check.

regression=# create function foo() returns bool as 'select true' language sql;
CREATE FUNCTION
regression=# create table foo (f1 int check (foo()));
CREATE TABLE

Possibly there should be such a restriction, but there isn't today...

            regards, tom lane

pgsql-general by date:

Previous
From: Michael Glaesemann
Date:
Subject: Re: Using SUBSELECT in CHECK expressions
Next
From: Michael Glaesemann
Date:
Subject: Re: Using SUBSELECT in CHECK expressions