Fran Fabrizio <ffabrizio(at)mmrd(dot)com> writes:
> I feel like I'm missing something obvious.
Well, you could use a temp table if you access it via EXECUTEd commands.
Or you could use a non-temp table and just not unlock; let the unlock
happen at normal end of transaction. The latter is probably easier.
regards, tom lane