Patrick Welche <prlw1@newn.cam.ac.uk> writes:
> One thing which bugs me: I have a currval in there, and that is the very
> first query which reaches the database, so it won't be "set", will it, but
> then, how could it have worked for months with the other version of server?
Good question. Do you have any ON INSERT rules on that table?
Could you try setting a breakpoint at elog() to capture the stack trace
leading up to the error? (Note elog() will be called for each log entry
that's made, so if you just set the breakpoint at the start of the
routine, you'll have to 'continue' several times until the actual ERROR
call occurs.)
regards, tom lane