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


---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to