Johannes Bruegmann <johannes@jottbee.org> writes:
> Function _clean [6] wraps function _drop_part [4], and tries to drop
> some parts not needed any longer. Dropping a part using _drop_part [4]
> works. However, dropping some parts with function _clean [6] fails
> with the following error message:
> NOTICE: relation 50435 is still open
> What does it mean "relation 50435 is still open"?
What this probably means is that there is an active query somewhere
within your session that is referencing that table --- such as an
unclosed cursor or unfinished plpgsql FOR-in-SELECT loop. I don't
see any such thing in the functions you showed us, but look around
in the rest of your application.
regards, tom lane