You could run PREPARE and EXECUTE as SQL commands from psql. Please take a look at the documentation of those two commands. I haven't looked at TAP infrastructure, but you could open a psql session to a running server and send an arbitrary number of SQL queries through it.
PREPARE & EXECUTE doesn't go with the extended query way. it is
still exec_simple_query. What I did is I hacked some exec_bind_message
[1] logic, that's why I want to test extended queries.