Skip site navigation (1) Skip section navigation (2)

Re: Get constrrelid for fk constraints that lost it

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Get constrrelid for fk constraints that lost it
Date: 2002-09-30 16:19:09
Message-ID: 20020930091319.N81475-100000@megazone23.bigpanda.com (view raw or flat)
Thread:
Lists: pgsql-patches
On Mon, 30 Sep 2002, Tom Lane wrote:

> Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> writes:
> >> (We can tweak the RI triggers to make the runtime failure message be
> >> more helpful than "Relation 0 not found".)  ISTM the point of having
>
> > Are we mostly concerned about the case where it's 0 or all cases
> > where the constrrelid relation doesn't open?
>
> I'd only special-case OID 0; we can reasonably assume that came from
> a broken CREATE CONSTRAINT TRIGGER definition.  Any other failure is

What do we want to tell the user?  I was thinking we could give something
like:

 Trigger "blah" has no target table. You will need to remove the
triggers for this foreign key constraint and add the constraint again
using ALTER TABLE ADD CONSTRAINT.



In response to

pgsql-patches by date

Next:From: Peter EisentrautDate: 2002-09-30 21:42:20
Subject: Re: tweak CREATE SEQUENCE grammar
Previous:From: Tom LaneDate: 2002-09-30 15:24:20
Subject: Re: Get constrrelid for fk constraints that lost it

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group