Thanks a lot man!!! You saved my life :P -----Original Message----- From: pgsql-general-owner@xxxxxxxxxxxxxx [mailto:pgsql-general-owner@xxxxxxxxxxxxxx] On Behalf Of Tom Lane Sent: Martes, 08 de Noviembre de 2005 04:13 p.m. To: Cristian Prieto Cc: pgsql-general@xxxxxxxxxxxxxx; pgsql-hackers@xxxxxxxxxxxxxx Subject: Re: [HACKERS] Troubles with array_ref "Cristian Prieto" <cristian@xxxxxxxxxxxxxxx> writes: > Well, anyway, this is the Stored Function I've been workin on; it simply > take an array and an integer just to return this item from the array; The > array could have any kind of elements so I declare it as anyarray (the > parameter) and anyelement (the return value), please help me, I don't know > where to get info about it. You could save yourself a lot of time if you enabled warnings from your C compiler (eg, -Wall for gcc) and then paid some attention to them. The last parameter to array_ref is a bool *, not a bool, and I have no doubt that the backend is crashing while trying to dereference "false". (Another problem is that the fourth parameter should be -1 not VARSIZE.) regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org