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

Поиск
Список
Период
Сортировка
От Jeff Boes
Тема Bug in adddepend (was: pg_constraint missing many entries?)
Дата
Msg-id 31e9e0ad0c3bfc4a6c85bb0e9af94070@news.teranews.com
обсуждение исходный текст
Ответ на Re: pg_constraint missing many entries?  (Martijn van Oosterhout <kleptog@svana.org>)
Список 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


В списке pgsql-general по дате отправления:

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Point-in-time data recovery - v.7.4
Следующее
От: Robert Treat
Дата:
Сообщение: Re: [ADMIN] Point-in-time data recovery - v.7.4