Fran Fabrizio <ffabrizio(at)mmrd(dot)com> writes:
> (apprently sql functions do not automatically end
> transactions/release locks like plpgsql functions do)
Say what? There's no difference on that score for any kind of function;
none of them end transactions or release locks at exit.
regards, tom lane