"scott.marlowe" <scott(dot)marlowe(at)ihs(dot)com> writes:
> Don't make assumptions like that. In postgresql, DDL is transactionable.
I think his actual problem is that plpgsql cached a query plan for some
command while the index was in place, and then on a later re-execution
of the function, it tried to re-use the cached plan. This is a general
problem that we know we need to fix sooner or later --- cached plans
need to be invalidated when there are DDL changes to the underlying
tables, views, etc.
regards, tom lane