|Think about Loose Coupling|
i think you'll get answer from monks with great psql experience, but reading here and there i can guess it is not a Perl issue but a warning (yes just an annoying one) caused (if i understand correctly) by the driver: the transaction is already started and psql give back this warning (for you safety)
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
In reply to Re: How to remove the warning: "there is already a transaction in progress" when using lock table