Re: Broken Constraint Checking in Functions

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Curt Sampson <cjs(at)cynic(dot)net>
Cc: Akira Matsuo <akira(at)vanten(dot)com>, Mark Van Wouw <mark(at)vanten(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Broken Constraint Checking in Functions
Date: 2003-10-24 04:39:29
Message-ID: 200310240439.h9O4dTn07932@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Curt Sampson wrote:
> On Fri, 24 Oct 2003, Bruce Momjian wrote:
>
> > I am not sure we should add something to the SET CONSTRAINT page on
> > this. Our current behavior is clearly a bug, and for that reason
> > belongs more on the TODO list, where it already is:
>
> Had it been on the SET CONSTRAINT page, it would have saved me several
> hours of debugging. I found the entry only after tracking down the
> problem and creating a simple test case to demonstrate it.
>
> We document other bugs on this page, e.g.:
>
> Currently, only foreign key constraints are affected by this
> setting. Check and unique constraints are always effectively
> initially immediate not deferrable.
>
> So why not document this one as well?

Does it belong on the SET CONSTRAINT page, the CREATE TABLE page, or the
CREATE FUNCTION page?

> > * Have AFTER triggers execute after the appropriate SQL statement in a
> > function, not at the end of the function
> >
> > The big question is whether this entry is clear enough for people to
> > understand it could bite them.
>
> My big question is, should we expect that anybody reading the
> documentation also has to go through the TODO list to see if there are
> bugs on the list not mentioned in the manual?

This is more of a "this is a clear bug" rather than an judgement call or
something. I can add it, but we do expect most people to read the TODO
list because it shows our shortcomings. Can I get anyone else to
recommend adding it to the CREATE CONSTRAINT manual page?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Curt Sampson 2003-10-24 04:52:38 Re: Broken Constraint Checking in Functions
Previous Message phd9110 2003-10-24 04:33:57 rte in set_plan_rel_pathlist()