"Robert Wimmer" <seppwimmer(at)hotmail(dot)com> writes:
> i cannot drop a temporary table that was created in a plpgsql function.
It was created with "on commit drop". Are you sure it still exists?
The problem looks to me like the well-known issue that plpgsql caches
plans, and so you can't have it refer to different temp tables on
successive executions (in the same session) unless you use EXECUTE.
regards, tom lane