in reply to psql splitter for php

If you're using the PHP function-based interface for PostgreSQL, you're probably out of luck.

If you use PDO (the object-oriented interface, which is basically PHP's version of Perl's DBI), then it's not a lot of work. Just write your own class that implements DBO's interface.