Bug in adddepend (was: pg_constraint missing many entries?)

From: Jeff Boes <jboes(at)nexcerpt(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Bug in adddepend (was: pg_constraint missing many entries?)
Date: 2003-11-18 14:07:19
Message-ID: 31e9e0ad0c3bfc4a6c85bb0e9af94070@news.teranews.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Martijn van Oosterhout wrote:
> 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.
>

And much to my dismay, it has a bug (or a serious limitation).

Table (before):

...

Indexes: ix_foo_1 unique(fn_myfunc(foo_column))

becomes

Table (after):

...

Indexes: ix_foo_1 unique(foo_column))

That is, the script turned a functional index into an index on a column.
Bad, bad news. It's fortunate I did this on our test system; it's
unfortunate that I did it at the end of the day. Overnight, we ran a few
HUNDRED THOUSAND queries against a large table using no index ...

--
Jeff Boes vox 269.226.9550 ext 24
Database Engineer fax 269.349.9076
Nexcerpt, Inc. http://www.nexcerpt.com
...Nexcerpt... Extend your Expertise

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Franco Bruno Borghesi 2003-11-18 14:08:06 Re: [GENERAL] Point-in-time data recovery - v.7.4
Previous Message Rafael Martinez Guerrero 2003-11-18 14:01:15 Point-in-time data recovery - v.7.4