add psql FOR UPDATE OF functionality

Hello,

can you please assist me with this patch? I'm trying to add FOR UPDATE OF functionality, but I'm not sure I'm doing the right thing. Right now this relies on the user giving the right string in the of='tablename' part, but I would like this to be automatically extracted from a mapper somehow.

Thanks,
Mario