Rosser Schwarz <[EMAIL PROTECTED]> writes:
> When we group the statements together and wrap them in
> a CREATE FUNCTION, running the function fails with:
> ERROR: index expressions and predicates may refer only to the table
> being indexed
I believe what is happening is that the entire SQL funct
while you weren't looking, Tom Lane wrote:
[...]
> If you want to encapsulate this set of operations in a function, I'd
> suggest using plpgsql and being careful to EXECUTE each query rather
> than letting plpgsql try to cache a plan for it.
We've opted to simply script issuing the statements se
Rosser Schwarz <[EMAIL PROTECTED]> writes:
> We've opted to simply script issuing the statements serially, rather
> than as a function for this one. Your explanation makes sense, Tom,
> though I'm curious why it works in our long-running case (beyond the
> issue of fewer indices there).
Does the
while you weren't looking, Tom Lane wrote:
> Does the other case have any partial indexes?
No it doesn't, and I caught it on reflection.
> I'd describe that as "miraculously managing not to
> fail", though, not as a behavior I'd care to rely on.
Most definitely not; it's already changed.
/rls