On Sun, Apr 26, 2009 at 04:20:41PM -0430, Werner Echezuria wrote:
> Hi, I've been trying to sort a column that performs some calculations, but
> postgres says this: ERROR:  invalid attnum: -12851. I was searching on the
> source code, and I guess the error araises around this macro:

I'm pretty sure this is a "not supposed to happen" thing. Do you have a
repoducable test case? Also, what version of postgres?

> /*
>      * Copy the given tuple into memory we control, and decrease availMem.
>      * Then call the common code.
>      */
>     COPYTUP(state, &stup, (void *) slot);
> 
> So, I'd like to know what COPYTUP does?, what is availMem?, How can I tell
> postgres it is a valid attnum?

COPYTUP does exactly what the comment says it does. I'm guessing this
is in the sort code somewhere? An "attnum" is a column number, like the
first column is attnum 1. Attnum -12851 is definitly bogus.

Have a nice day,
-- 
Martijn van Oosterhout   <klep...@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while 
> boarding. Thank you for flying nlogn airlines.

Attachment: signature.asc
Description: Digital signature

Reply via email to