On 02/24/2011 12:13 PM, Greg Smith wrote:
> That's not quite the right filter. You want to screen out
> everything that isn't a unique index, not just the primary key ones.
> You probably can't drop any of those without impacting database
> integrity.
Ah yes. I was considering adding the clause for unique indexes. Filthy
constraint violations.
> Also, as a picky point, you really should use functions like
> pg_relation_size instead of doing math on relpages.
You know, I always think about that, but I'm essentially lazy. :) I
personally haven't ever had the old *8 trick fail, but from your
perspective of working with so many variations, I could see how you'd
want to avoid it.
I'll be good from now on. ;)
--
Shaun Thomas
OptionsHouse | 141 W. Jackson Blvd. | Suite 800 | Chicago IL, 60604
312-676-8870
sthomas@peak6.com
______________________________________________
See http://www.peak6.com/email_disclaimer.php
for terms and conditions related to this email