Re: function fails where individual statements succeed - Mailing list pgsql-sql

From Rosser Schwarz
Subject Re: function fails where individual statements succeed
Date
Msg-id 37d451f704083011341f51cdaa@mail.gmail.com
Whole thread Raw
In response to function fails where individual statements succeed  (Rosser Schwarz <rosser.schwarz@gmail.com>)
List pgsql-sql
while you weren't looking, Josh Berkus wrote:

> Statement 14 should be that one.  Can you test it, and the statements
> immediately preccedeing and succeeding it on the command line again?

Just running the CREATE INDEXes (after issuing the appropriate DROPs,
of course) succeeds.

> Also, can you try the whole run without the COPY statement?   I'm curious to
> see if something in the COPY file is messing things up.

Running without the COPY yields a substantively similar error message.

Again, this error only happens when the statements are executed in the
context of a function; outside, even issued all at once separated by
semicolons, the behavior is correct.

I was just reminded that there is another difference between this
function and the working one: this one is rather more heavily indexed.
(None of the compound, conditional indices exist in the earlier,
working version.) That might point in the direction of the error,
though it doesn't explain why it only fails in a function; I'll do
some digging.

/rls

-- 
:wq


pgsql-sql by date:

Previous
From: Rosser Schwarz
Date:
Subject: function fails where individual statements succeed
Next
From: Tom Lane
Date:
Subject: Re: function fails where individual statements succeed