Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
>> Kind of like a simple semaphore. Isn't that what you are getting at?
> LISTEN/NOTIFY might be useful for this...
LISTEN/NOTIFY would be one of the things we were trying to *test*.
It's not helpful for checking intra-transaction-block behavior anyway,
since notifys are only sent at commit and only heard between
transactions.
I like the tcl/expect idea a lot. We'd have to upgrade our tcl
interface to support asynchronous queries (ie, send query then do other
stuff until answer arrives); AFAIR it can't handle that now. But that'd
be well worth doing anyway...
regards, tom lane