Grepping, I found a form here:
/ecommerce/www/admin/customer-service/gift-certificates.tcl
but it doesn't look like it's been ported to postgresql.
That's a good starting point. Am I remembering correctly that the "query extractor" tool is supposed to be helpful for the problem of updating unported tcl forms?