D.4.24. Changes in release 3.23.36 (27 Mar 2001) ... Added SELECT ... FOR UPDATE. -- Zigger
Thanks, Zigger - looks like you've hit the problem. I'm surprised it's such an old version on there - it's a hosted account. On the other hand, I've had it since then, and they may well have just figured it's better not to change it as long as things are working. I've submitted a request to get it updated a bit.
Thanks again to everyone who gave me advice on this, and helped with finding the actual error.