Hi, <br /><br />Consider this simple case:<br /><br />postgres=# TRUNCATE foo, foo; <br />ERROR: cannot TRUNCATE "foo"
becauseit is being used by active queries in this session <br /><br />The above occurs because the ExecuteTruncate()
functioninvokes truncate_check_rel() in a loop. Since the same table name appears twice, the rd_refcnt for table "foo"
isbumped up to 2, causing the above failure.<br /><br clear="all" />We might want to add a step to ExecuteTruncate(),
orwhatever calls it, to make the list unique.<br /><br />Regards,<br />Nikhils<br />-- <br />EnterpriseDB <a
href="http://www.enterprisedb.com">http://www.enterprisedb.com</a>