Re: pg_constraint missing many entries?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Jeff Boes <jboes(at)nexcerpt(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_constraint missing many entries?
Date: 2003-11-17 20:55:17
Message-ID: 20031117205516.GA862@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

That's right, pg_constraint didn't exist before 7.3. In the contrib
directory there is a script called adddepend which attempts to create the
missing records for you.

On Mon, Nov 17, 2003 at 08:20:54PM +0000, Jeff Boes wrote:
> Almost all of my foreign key definitions are NOT present in
> pg_constraint. However, they do exist as triggers. It appears that *new*
> foreign keys, whether defined in new tables or added on via "ALTER
> TABLE" commands, make it into pg_constraint, but the "old" stuff that
> was present from before our 7.3 upgrade, exists only as triggers.
>
> 1) Is this a bug?
>
> 2) Is there any way to "refresh" pg_constraint? (I'm experimenting with
> a tool that graphs a schema, and it needs a bit of code written to
> determine from a table and column name whether that column is a foreign
> key, and to what table. pg_constraint where contype = 'f' seems to be
> the ticket, but on my database it's inadequate.)
>
>
> --
> Jeff Boes vox 269.226.9550 ext 24
> Database Engineer fax 269.349.9076
> Nexcerpt, Inc. http://www.nexcerpt.com
> ...Nexcerpt... Extend your Expertise
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> "All that is needed for the forces of evil to triumph is for enough good
> men to do nothing." - Edmond Burke
> "The penalty good people pay for not being interested in politics is to be
> governed by people worse than themselves." - Plato

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Julie May 2003-11-17 21:35:29 arrays as parameters to pl/pgsql functions
Previous Message scott.marlowe 2003-11-17 20:50:43 Re: embedded postgresql + C++ IDE