Re: pg_dump and check-constraints - Mailing list pgsql-general

From Tom Lane
Subject Re: pg_dump and check-constraints
Date
Msg-id 18517.1254406031@sss.pgh.pa.us
Whole thread Raw
In response to pg_dump and check-constraints  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List pgsql-general
"A. Kretschmer" <andreas.kretschmer@schollglas.com> writes:
> test=# create function check_b() returns bool as $$ declare s int; begin select into s sum(i) from b; if s > 3 then
returntrue; else return false; end if; end;$$ language plpgsql; 

> test=*# create table a (i int check(check_b()));

This is unsupported, and will fail in *many* situations not only
pg_dump.  A check constraint is only expected to examine the current
row of its table.

            regards, tom lane

pgsql-general by date:

Previous
From: "A. Kretschmer"
Date:
Subject: pg_dump and check-constraints
Next
From: Ricky Tompu Breaky
Date:
Subject: Re: I can not drop a user/role because an object depent on it.